From 090baa1fa968d85da51dfdfcded2da6430900d7f Mon Sep 17 00:00:00 2001 From: Matthew Oliver Date: Fri, 4 Jul 2014 15:56:45 +1000 Subject: [PATCH] Swift configuration parameter audit This change is the result of an audit through the config parameters provided by swift and how/if they are addressed in the swift documentation. The documentation being the sample config files in the /etc directory or the documentation. This change is only concerned with the config files in etc/ next I will look at the documentation in the doc/ folder. This change makes the following assumptions: - Unless stated otherwise, the commented out parameter in the sample configuration is the default for swift. - When the default in the code differs from that of the sample configuration, the default in the code is correct. Container reconciler: Parameter: interval - code: 30 - config: 300 Result: config = 30 Object Expirer: Parameter: recon_cache_path - code: /var/cache/swift - config: Parameter missing Result: Add parameter swift-dispersion-populate && swift-dispersion-report Parameter: auth_version - code: 1.0 - config: 2.0 (due to being a confusing example of how to setup version 2.0). Result: Added 'auth_version = 1.0' to the right section (showing default and make the sample configuration for auth version 2.0 easier to understand. swift-drive-audit: Parameter: log_file_pattern - code: /var/log/kern.*[!.][!g][!z] - config: /var/log/kern* Result: config = /var/log/kern.*[!.][!g][!z] NOTE: swift-drive-audit uses a parameter called device_dir which defaults to '/srv/node'. In all other swift binaries/services there is a similar parameter called devices which stores the same thing. This is an inconsistency which I haven't fixed as this could break existing swift clusters out in the wild. Proxy Server: Parameter: object_chunk_size - code: 65536 - config: 8192 Result: config = 65536 Parameter: client_chunk_size - code: 65536 - config: 8192 Result: config = 65536 Parameter: strict_cors_mode - code: True - config: No parameter Result: config = True Account and Container replicator configuration confusion: NOTES: The account and container replicators have parameters: - interval - run_pause Both of these are loaded into the same variable in code: self.interval = int(conf.get('interval') or conf.get('run_pause') or 30) If a user sets both to different values then interval is used. Result: Update the configuration to make this more clear. DocImpact Change-Id: Iaadbb1a6284f8b3e0801bc343b29772f70f4bf6e --- etc/account-server.conf-sample | 2 ++ etc/container-reconciler.conf-sample | 2 +- etc/container-server.conf-sample | 2 ++ etc/dispersion.conf-sample | 5 +++++ etc/drive-audit.conf-sample | 4 ++-- etc/object-expirer.conf-sample | 1 + etc/proxy-server.conf-sample | 6 +++--- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/etc/account-server.conf-sample b/etc/account-server.conf-sample index 85f330f3df..5b03886921 100644 --- a/etc/account-server.conf-sample +++ b/etc/account-server.conf-sample @@ -110,6 +110,8 @@ use = egg:swift#recon # reclaim_age = 604800 # # Time in seconds to wait between replication passes +# Note: if the parameter 'interval' is defined then it will be used in place +# of run_pause. # run_pause = 30 # # recon_cache_path = /var/cache/swift diff --git a/etc/container-reconciler.conf-sample b/etc/container-reconciler.conf-sample index 0a3de0220d..4301641ac4 100644 --- a/etc/container-reconciler.conf-sample +++ b/etc/container-reconciler.conf-sample @@ -29,7 +29,7 @@ # in the queue. # reclaim_age = 604800 # The cycle time of the daemon -# interval = 300 +# interval = 30 # Server errors from requests will be retried by default # request_tries = 3 diff --git a/etc/container-server.conf-sample b/etc/container-server.conf-sample index be94ea48cc..e47b2287a4 100644 --- a/etc/container-server.conf-sample +++ b/etc/container-server.conf-sample @@ -111,6 +111,8 @@ use = egg:swift#recon # reclaim_age = 604800 # # Time in seconds to wait between replication passes +# Note: if the parameter 'interval' is defined then it will be used in place +# of run_pause. # run_pause = 30 # # recon_cache_path = /var/cache/swift diff --git a/etc/dispersion.conf-sample b/etc/dispersion.conf-sample index 65813cbb30..7ce920e87d 100644 --- a/etc/dispersion.conf-sample +++ b/etc/dispersion.conf-sample @@ -4,10 +4,15 @@ auth_url = http://localhost:8080/auth/v1.0 auth_user = test:tester auth_key = testing +# auth_version = 1.0 +# +# NOTE: If you want to use keystone (auth version 2.0), then its configuration +# would look something like: # auth_url = http://localhost:5000/v2.0/ # auth_user = tenant:user # auth_key = password # auth_version = 2.0 +# # endpoint_type = publicURL # keystone_api_insecure = no # diff --git a/etc/drive-audit.conf-sample b/etc/drive-audit.conf-sample index a07f0a8acd..50613ae7e2 100644 --- a/etc/drive-audit.conf-sample +++ b/etc/drive-audit.conf-sample @@ -11,7 +11,7 @@ # # Location of the log file with globbing # pattern to check against device errors. -# log_file_pattern = /var/log/kern* +# log_file_pattern = /var/log/kern.*[!.][!g][!z] # # Regular expression patterns to be used to locate # device blocks with errors in the log file. Currently @@ -19,7 +19,7 @@ # \berror\b.*\b(sd[a-z]{1,2}\d?)\b # \b(sd[a-z]{1,2}\d?)\b.*\berror\b # One can overwrite the default ones by providing -# new expressions using the format below: +# new expressions using the format below: # Format: regex_pattern_X = regex_expression # Example: # regex_pattern_1 = \berror\b.*\b(dm-[0-9]{1,2}\d?)\b diff --git a/etc/object-expirer.conf-sample b/etc/object-expirer.conf-sample index 611be36548..8fd4feca80 100644 --- a/etc/object-expirer.conf-sample +++ b/etc/object-expirer.conf-sample @@ -50,6 +50,7 @@ # up to reclaim_age seconds before it gives up and deletes the entry in the # queue. # reclaim_age = 604800 +# recon_cache_path = /var/cache/swift [pipeline:main] pipeline = catch_errors cache proxy-server diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index ec8eb8ef9e..c6f4828b79 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -70,6 +70,7 @@ # # Use a comma separated list of full url (http://foo.bar:1234,https://foo.bar) # cors_allow_origin = +# strict_cors_mode = True # # client_timeout = 60 # eventlet_debug = false @@ -88,8 +89,8 @@ use = egg:swift#proxy # log_handoffs = true # recheck_account_existence = 60 # recheck_container_existence = 60 -# object_chunk_size = 8192 -# client_chunk_size = 8192 +# object_chunk_size = 65536 +# client_chunk_size = 65536 # # How long the proxy server will wait on responses from the a/c/o servers. # node_timeout = 10 @@ -204,7 +205,6 @@ use = egg:swift#proxy # usually indicates administrative responsibilities. # swift_owner_headers = x-container-read, x-container-write, x-container-sync-key, x-container-sync-to, x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, x-account-access-control - [filter:tempauth] use = egg:swift#tempauth # You can override the default log routing for this filter here: