container-server.conf(5)

πŸ“¦
version 2.38.2 Β· 2 versions
, in debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– container-server.conf(5) πŸ’–

ok bestie, gather round 🫢 this is container-server.conf(5) β€” the manual for the config file of the OpenStack Swift container server. it's long, it's giving main character energy, and we're doing it in three parts. part 1 starts now. no cap.


✨ NAME ✨

container-server.conf β€” the configuration file for the OpenStack Swift container server πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

container-server.conf

πŸ¦‹ DESCRIPTION πŸ¦‹

This is the config file that the container server reads, and also all the container background services that tag along with it: the replicator, the updater, the auditor and sync. one file, many jobs, very versatile of it honestly ✨

The file follows python-pastedeploy syntax. Translation: it's split into sections, and sections get wrapped in square brackets. Each section holds a certain number of key/value parameters, and we're gonna describe every single one below β€” yes, all of them, we do not skip πŸ’–

Any line that begins with a # symbol is ignored. that's your comment escape hatch, use it, it's free 🌸

You can find more information about python-pastedeploy configuration format at https://docs.pylonsproject.org/projects/pastedeploy/en/latest/#config-format


πŸ‘‘ GLOBAL SECTION πŸ‘‘

This one is the section named [DEFAULT]. Below are the parameters that are acceptable within this section. sit down, there's a lot, we love a long list πŸŽ€

  • bind_ip β€” the IP address the container server should bind to. the default is 0.0.0.0, which means it binds to all the available addresses. it's giving "I'll take them all, thanks" 😌
  • bind_port β€” the TCP port the container server should bind to. the default is 6201.
  • keep_idle β€” the value to set for socket TCP_KEEPIDLE. the default value is 600.
  • bind_timeout β€” timeout for binding the socket. the default is 30.
  • backlog β€” TCP backlog. that's the maximum number of allowed pending connections. the default value is 4096. queue 'em up bestie 🫢
  • workers β€” the number of pre-forked processes that will accept connections. zero means no fork. the default is auto, which makes the server try to match the number of effective cpu cores if python multiprocessing is available (it's included with most python distributions >= 2.6) or fall back to one. also worth noting: individual workers will use many eventlet co-routines to service multiple concurrent requests. multitasking icon πŸ’…
  • max_clients β€” the maximum number of clients one worker can process simultaneously (it will actually accept(2) N + 1). setting this to one (1) will only handle one request at a time, without accepting another request concurrently. the default is 1024.
  • allowed_sync_hosts β€” a comma separated list of hosts allowed in the X-Container-Sync-To field for containers. this is the old-style way of doing container sync. it is strongly recommended that you use the new style instead β€” a separate container-sync-realms.conf, see container-sync-realms.conf-sample. the sample value here is allowed_sync_hosts = 127.0.0.1
  • user β€” the system user that the container server will run as. the default is swift.
  • swift_dir β€” the Swift configuration directory. the default is /etc/swift.
  • devices β€” the parent directory of where devices are mounted. the default is /srv/node.
  • mount_check β€” whether or not to check if the devices are mounted, so you don't accidentally write to the root device πŸ™ˆ (that would be a vibe check fail of epic proportions). the default is set to true.
  • disable_fallocate β€” disable pre-allocating disk space for a file. the default is false.
  • log_name β€” the label used when logging. the default is swift.
  • log_facility β€” the syslog log facility. the default is LOG_LOCAL0.
  • log_level β€” the logging level. the default is INFO.
  • log_address β€” the logging address. the default is /dev/log.
  • log_max_line_length β€” this caps the length of log lines to the value given; there's no limit if it's set to 0, which is the default.
  • log_custom_handlers β€” a comma separated list of functions to call to set up custom log handlers. the functions get passed: conf, name, log_to_console, log_route, fmt, logger, adapted_logger. the default is empty.
  • log_udp_host β€” if set, log_udp_host will override log_address.
  • log_udp_port β€” the UDP log port. the default is 514.
  • log_statsd_host β€” the StatsD server. IPv4/IPv6 addresses and hostnames are supported. if a hostname resolves to both an IPv4 and an IPv6 address, the IPv4 address will be used.
  • log_statsd_port β€” the default is 8125.
  • log_statsd_default_sample_rate β€” the default is 1.
  • log_statsd_sample_rate_factor β€” the default is 1.
  • log_statsd_metric_prefix β€” the default is empty.
  • db_preallocation β€” if you don't mind the extra disk space usage in overhead, you can turn this on to preallocate disk space with SQLite databases, which decreases fragmentation. the default is false. tradeoffs, bestie, it's always tradeoffs πŸ“
  • eventlet_debug β€” debug mode for the eventlet library. the default is false.
  • fallocate_reserve β€” you can set fallocate_reserve to the number of bytes or the percentage of disk space you'd like fallocate to reserve, whether there's space for the given file size or not. a percentage will be used if the value ends with a '%'. the default is 1%.
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. it only works together with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. the I/O niceness priority is a number which goes from 0 to 7. the higher the value, the lower the I/O priority of the process. it only works together with ionice_class. it's ignored if IOPRIO_CLASS_IDLE is set.

🌈 PIPELINE SECTION 🌈

This one is the section named [pipeline:main]. below are the parameters that are acceptable within this section.

  • pipeline β€” used when you need to apply a number of filters. it's a list of filters, ended by an application. the normal pipeline is "healthcheck recon container-server". that's the classic lineup, the holy trinity πŸ’…

⭐ APP SECTION ⭐

This one is the section named [app:container-server]. below are the parameters that are acceptable within this section.

  • use β€” the entry point for paste.deploy for the container server. this is the reference to the installed python egg. it's normally egg:swift#container.
  • set log_name β€” the label used when logging. the default is container-server.
  • set log_facility β€” the syslog log facility. the default is LOG_LOCAL0.
  • set log_level β€” the logging level. the default is INFO.
  • set log_requests β€” enables request logging. the default is True.
  • set log_address β€” the logging address. the default is /dev/log.
  • node_timeout β€” the request timeout to external services. the default is 3 seconds.
  • conn_timeout β€” the connection timeout to external services. the default is 0.5 seconds.
  • allow_versions β€” the default is false.
  • replication_server β€” the configure parameter for creating a specific server. to handle all verbs, including replication verbs, do not specify "replication_server" (this is the default). to only handle replication, set it to a True value (e.g. "True" or "1"). to handle only non-replication verbs, set it to "False". unless you have a separate replication network, you should not specify any value for "replication_server". read that one twice, bestie, it's the tricky one 🫢
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. it only works together with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. the I/O niceness priority is a number which goes from 0 to 7. the higher the value, the lower the I/O priority of the process. it only works together with ionice_class. it's ignored if IOPRIO_CLASS_IDLE is set.

✨ FILTER SECTION ✨

ok so any section whose name has filter: slapped on the front is a filter section, bestie πŸ’…. Filters are how you set up config parameters for specific swift middlewares. Below are the filters you can use and the parameters each one accepts 🫢.


πŸŽ€ [filter:healthcheck]

  • use β€” this is the paste.deploy entry point for the healthcheck middleware. It's basically the reference to the installed python egg. Normally it's egg:swift#healthcheck ✨.
  • disable_path β€” an optional filesystem path, and the way it works is: if that path is present, the healthcheck URL will return "503 Service Unavailable" with a body of "DISABLED BY FILE". Like, the file existing is the switch πŸ‘‘.

🌸 [filter:recon]

  • use β€” the paste.deploy entry point for the recon middleware. Again, it's the reference to the installed python egg. Normally egg:swift#recon πŸ’–.
  • recon_cache_path β€” this one just sets the directory where stats for a few items get stored. Depending on how you deployed, you might have to create this directory yourself and make sure swift has read/write on it. Default is /var/cache/swift πŸ¦‹.

🧚 [filter:xprofile]

  • use β€” the paste.deploy entry point for the xprofile middleware. Yes, it's the reference to the installed python egg again. Normally egg:swift#xprofile ⭐.
  • profile_module β€” this option lets you switch profilers, and whatever you pick needs to inherit from the python standard profiler. Currently the supported value can be 'cProfile', 'eventlet.green.profile' etc. πŸ“Š
  • log_filename_prefix β€” this prefix gets combined with the process ID and a timestamp to name the profile data file. Make sure the executing user has permission to write into this path (missing path segments will be created, if necessary, so don't stress about that part). And heads up: if you enable profiling in more than one type of daemon, you must override it with a unique value, like... just make it unique, okay? The default is /var/log/swift/profile/account.profile πŸ’œ.
  • dump_interval β€” the profile data gets dumped to local disk based on that naming rule above, in this interval. Default is 5.0 ⏱️.
🚨 be careful with this next one, bestie...
  • dump_timestamp β€” careful, this option makes the profiler dump data into the file with a time stamp, which means there will be lots of files piling up in the directory. Like, a LOT. Default is false πŸ’€.
  • path β€” this is the path of the URL you use to access the mini web UI. Default is __profile__ 🌈.
  • flush_at_shutdown β€” clears the data when the wsgi server shuts down. Default is false 🧹.
  • unwind β€” unwinds the iterator of applications. Default is false πŸ”₯.

✨ ADDITIONAL SECTIONS ✨

okay so these next blocks are the side-character sections β€” they don't belong to the main container server, but the other swift-container girlies read them: the replicator, the updater, the auditor, and the sync service. each one gets its own little config block, and lowkey they all start with the same four logging keys because of course they do πŸ’…


πŸ’– [container-replicator]

  • log_name β€” the label it uses when logging. default is container-replicator.
  • log_facility β€” the syslog log facility. default is LOG_LOCAL0.
  • log_level β€” logging level. default is INFO.
  • log_address β€” logging address. default is /dev/log.
  • per_diff β€” the max number of database rows that get sync'd in one single HTTP replication request. default is 1000.
  • max_diffs β€” this one caps how long the replicator will spend trying to sync a given database per pass, so the other databases don't get starved and start acting neglected 😭 default is 100.
  • concurrency β€” how many replication workers to spawn. default is 8.
  • run_pause [deprecated] β€” time in seconds to wait between replication passes. default is 30.
  • interval β€” replaces run_pause with the more standard "interval", which means the replicator won't pause unless it takes less than the interval you set. default is 30.
  • node_timeout β€” request timeout to external services. default is 10 seconds.
  • conn_timeout β€” connection timeout to external services. default is 0.5 seconds.
  • reclaim_age β€” time elapsed in seconds before an container can be reclaimed. default is 604800 seconds.
  • rsync_compress β€” lets rsync compress the data it transmits to the destination node during sync. however, this only applies when the destination node is in a different region than the local one. default is false.
  • rsync_module β€” format of the rsync module where the replicator will send data. see etc/rsyncd.conf-sample for some usage examples.
  • recon_cache_path β€” path to the recon cache directory. default is /var/cache/swift.
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. work only with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from 0 to 7. the higher the value, the lower the I/O priority of the process. work only with ionice_class. ignored if IOPRIO_CLASS_IDLE is set.

πŸ” [container-updater]

  • log_name β€” the label used when logging. default is container-updater.
  • log_facility β€” syslog log facility. default is LOG_LOCAL0.
  • log_level β€” logging level. default is INFO.
  • log_address β€” logging address. default is /dev/log.
  • interval β€” minimum time for a pass to take. default is 300 seconds.
  • concurrency β€” number of updater workers to spawn. default is 4.
  • node_timeout β€” request timeout to external services. default is 3 seconds.
  • conn_timeout β€” connection timeout to external services. default is 0.5 seconds.
  • containers_per_second β€” max containers updated per second. should be tuned according to your individual system specs, bestie, no copy-paste energy. 0 is unlimited. default is 50.
  • slowdown [deprecated] β€” slowdown will sleep that amount between containers. default is 0.01 seconds. deprecated in favor of containers_per_second.
  • account_suppression_time β€” seconds to suppress updating an account that has generated an error. default is 60 seconds.
  • recon_cache_path β€” path to the recon cache directory. default is /var/cache/swift.
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. work only with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from 0 to 7. the higher the value, the lower the I/O priority of the process. work only with ionice_class. ignored if IOPRIO_CLASS_IDLE is set.

πŸ” [container-auditor]

  • log_name β€” the label used when logging. default is container-auditor.
  • log_facility β€” syslog log facility. default is LOG_LOCAL0.
  • log_level β€” logging level. default is INFO.
  • log_address β€” logging address. default is /dev/log.
  • interval β€” will audit, at most, 1 container per device per interval. default is 1800 seconds.
  • containers_per_second β€” max containers audited per second. should be tuned according to your individual system specs. 0 is unlimited. default is 200.
  • recon_cache_path β€” path to the recon cache directory. default is /var/cache/swift.
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. work only with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from 0 to 7. the higher the value, the lower the I/O priority of the process. work only with ionice_class. ignored if IOPRIO_CLASS_IDLE is set.

πŸ¦‹ [container-sync]

  • log_name β€” the label used when logging. default is container-sync.
  • log_facility β€” syslog log facility. default is LOG_LOCAL0.
  • log_level β€” logging level. default is INFO.
  • log_address β€” logging address. default is /dev/log.
  • sync_proxy β€” if you need to use an HTTP proxy, set it here; defaults to no proxy.
  • interval β€” will audit, at most, each container once per interval. default is 300 seconds.
  • container_time β€” maximum amount of time to spend syncing each container per pass. default is 60 seconds.
  • conn_timeout β€” connection timeout to external services. default is 5 seconds.
  • request_tries β€” server errors from requests will be retried by default. default is 3.
  • internal_client_conf_path β€” internal client config file path.
  • nice_priority β€” modify the scheduling priority of server processes. niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). the default does not modify priority.
  • ionice_class β€” modify the I/O scheduling class of server processes. the I/O niceness class values are IOPRIO_CLASS_RT (realtime), IOPRIO_CLASS_BE (best-effort) and IOPRIO_CLASS_IDLE (idle). the default does not modify class and priority. work only with ionice_priority.
  • ionice_priority β€” modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from 0 to 7. the higher the value, the lower the I/O priority of the process. work only with ionice_class. ignored if IOPRIO_CLASS_IDLE is set.

πŸ“š DOCUMENTATION πŸ“š

more in-depth documentation about the swift-container-server and also OpenStack Swift as a whole can be found at https://docs.openstack.org/swift/latest/admin_guide.html and https://docs.openstack.org/swift/latest/ β€” go read it, it's giving study session but make it cute 🫢


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie, you made it to the end πŸŽ€ this one's from the Linux fam, dated 8/26/2011, and it lives in section 5 as container-server.conf(5) β€” go forth and configure responsibly, no cap πŸ’…βœ¨