swift.conf(5)

πŸ“¦
version 2.35.1 Β· 2 versions
, in debian trixie, nixos 26.05, nixpkgs unstable

πŸ’– swift.conf(5) β€” the OpenStack Swift glow-up πŸ’–

okay bestie, listen. this is swift.conf, the common configuration file for the OpenStack object storage services. she's the shared vibe file that literally every service in OpenStack object storage reads from. not a side character. the main character. periodt. πŸ‘‘


✨ SYNOPSIS ✨

swift.conf

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the common configuration file used by all services of OpenStack object storage services. everybody shares her, no cap.

the config file follows the python-pastedeploy syntax. she's split into sections, and sections are wrapped in square brackets [like this]. each section holds a certain number of key/value parameters, and we'll get into those below, don't worry.

any line that starts with a # symbol is ignored. so go off with your comments, they're literally invisible. πŸ™ˆ

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


🌸 SWIFT HASH SECTION 🌸

this one is indicated by the section named [swift-hash]. here's what you're allowed to put in her:

  • swift_hash_path_suffix
  • swift_hash_path_prefix

okay so swift_hash_path_suffix and swift_hash_path_prefix are used as part of the hashing algorithm when figuring out data placement in the cluster. these values should remain secret and MUST NOT change once a cluster has been deployed. like, do not touch them. not even a little. πŸ’€

use only printable chars, like:

python -c "import string; print(string.printable)"

πŸŽ€ STORAGE POLICY SECTION πŸŽ€

this one is indicated by the section name [storage-policy:#].

storage policies get defined here, and they determine various characteristics about how objects are stored and treated. policies are specified by name on a per container basis. the policy index is specified in the section header and is used internally.

the policy with index 0 is always used for legacy containers and can be given a name for use in metadata β€” but the ring file name will always be object.ring.gz for backwards compatibility. if no policies are defined, a policy with index 0 will be automatically created for backwards compatibility and given the name Policy-0.

a default policy is used when creating new containers when no policy is specified in the request. if no other policies are defined, the policy with index 0 will be declared the default. if multiple policies are defined, you must define a policy with index 0 and you must specify a default. it is recommended you always define a section for storage-policy:0. aliases are not mandatory when defining a storage policy. 🫢

[storage-policy:index]

each storage policy is defined in a separate section with an index specified in the header. below are the parameters that are acceptable within this section:

  • name β€” name of the storage policy. policy names are case insensitive.
  • aliases β€” multiple names can be assigned to one policy using aliases. all names must follow the Swift naming rules.
  • policy_type β€” policy type can be replication or erasure_coding. a replication policy replicates the objects to a specified number of replicas. erasure coding uses the PyECLib API library for encode/decode operations. please refer to Swift documentation for details on how erasure coding is implemented.
  • ec_type β€” this parameter must be chosen from the list of EC backends supported by PyECLib.
  • ec_num_data_fragments β€” this parameter is specific to erasure coding policy_type only. it defines the number of fragments that will be comprised of data.
  • ec_num_parity_fragments β€” this parameter is specific to erasure coding policy_type only. it defines the number of fragments that will be comprised of parity.
  • ec_object_segment_size β€” this parameter is specific to erasure coding policy_type only. it defines the amount of data that will be buffered up before feeding a segment into the encoder/decoder. the default value is 1048576.

✨ Examples ✨

[storage-policy:0]
name = Policy-0
default = yes
policy_type = replication
aliases = yellow, orange

[storage-policy:1]
name = silver
policy_type = replication

[storage-policy:2]
name = deepfreeze10-4
aliases = df10-4
policy_type = erasure_coding
ec_type = liberasurecode_rs_vand
ec_num_data_fragments = 10
ec_num_parity_fragments = 4
ec_object_segment_size = 1048576

🧚 SWIFT CONSTRAINTS SECTION 🧚

this one is indicated by the section name [swift-constraints]. this section sets the basic constraints on data saved in the swift cluster. these constraints are automatically published by the proxy server in responses to /info requests. here's what's acceptable in here:

  • max_file_size β€” max_file_size is the largest "normal" object that can be saved in the cluster. this is also the limit on the size of each segment of a "large" object when using the large object manifest support. this value is set in bytes. setting it to lower than 1MiB will cause some tests to fail. it is STRONGLY recommended to leave this value at the default (5 * 2**30 + 2). bestie, don't touch it. πŸ”₯
  • max_meta_name_length β€” max_meta_name_length is the max number of bytes in the utf8 encoding of the name portion of a metadata header.
  • max_meta_value_length β€” max_meta_value_length is the max number of bytes in the utf8 encoding of a metadata value.
  • max_meta_count β€” max_meta_count is the max number of metadata keys that can be stored on a single account, container, or object.
  • max_meta_overall_size β€” max_meta_overall_size is the max number of bytes in the utf8 encoding of the metadata (keys + values).
  • max_header_size β€” max_header_size is the max number of bytes in the utf8 encoding of each header. using 8192 as default because eventlet uses 8192 as max size of header line. this value may need to be increased when using identity v3 API tokens including more than 7 catalog entries.
  • extra_header_count β€” by default the maximum number of allowed headers depends on the number of max allowed metadata settings plus a default value of 36 for swift internally generated headers and regular http headers. if for some reason this is not enough (custom middleware for example) it can be increased with the extra_header_count constraint.
  • max_object_name_length β€” max_object_name_length is the max number of bytes in the utf8 encoding of an object name.
  • container_listing_limit β€” container_listing_limit is the default (and max) number of items returned for a container listing request.
  • account_listing_limit β€” account_listing_limit is the default (and max) number of items returned for an account listing request.
  • max_account_name_length β€” max_account_name_length is the max number of bytes in the utf8 encoding of an account name.
  • max_container_name_length β€” max_container_name_length is the max number of bytes in the utf8 encoding of a container name.
  • valid_api_versions β€” by default, all REST API calls should use "v1" or "v1.0" as the version string, for example /v1/account. this can be manually overridden to make this backward-compatible, in case a different version string has been used before. use a comma-separated list in case of multiple allowed versions, for example valid_api_versions = v0,v1,v2. this is only enforced for account, container and object requests. the allowed api versions are by default excluded from /info.
  • auto_create_account_prefix β€” auto_create_account_prefix specifies the prefix for system accounts, such as those used by the object-expirer, and container-sharder. default is ".".

🌈 DOCUMENTATION 🌈

more in-depth documentation about the swift.conf 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/


and that's the whole page bestie πŸ’œ this one's from the Linux manual, dated 8/8/2016, and she's filed as swift.conf(5). iconic. ate. no crumbs. go configure something beautiful. βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from