Allow floats for all intervals
Change-Id: I91e9bc02d94fe7ea6e89307305705c383087845a
This commit is contained in:
parent
c5fe114c96
commit
c374a7a851
@ -151,9 +151,9 @@ use = egg:swift#recon
|
||||
# concurrency = 8
|
||||
#
|
||||
# Time in seconds to wait between replication passes
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
# run_pause is deprecated, use interval instead
|
||||
# run_pause = 30
|
||||
# run_pause = 30.0
|
||||
#
|
||||
# Process at most this many databases per second
|
||||
# databases_per_second = 50
|
||||
@ -214,7 +214,7 @@ use = egg:swift#recon
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# Will audit each account at most once per interval
|
||||
# interval = 1800
|
||||
# interval = 1800.0
|
||||
#
|
||||
# accounts_per_second = 200
|
||||
# recon_cache_path = /var/cache/swift
|
||||
@ -239,7 +239,7 @@ use = egg:swift#recon
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# concurrency = 25
|
||||
# interval = 3600
|
||||
# interval = 3600.0
|
||||
# node_timeout = 10
|
||||
# conn_timeout = 0.5
|
||||
#
|
||||
|
@ -41,7 +41,7 @@
|
||||
# in the queue.
|
||||
# reclaim_age = 604800
|
||||
# The cycle time of the daemon
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
# Server errors from requests will be retried by default
|
||||
# request_tries = 3
|
||||
#
|
||||
|
@ -161,9 +161,9 @@ use = egg:swift#recon
|
||||
# concurrency = 8
|
||||
#
|
||||
# Time in seconds to wait between replication passes
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
# run_pause is deprecated, use interval instead
|
||||
# run_pause = 30
|
||||
# run_pause = 30.0
|
||||
#
|
||||
# Process at most this many databases per second
|
||||
# databases_per_second = 50
|
||||
@ -223,7 +223,7 @@ use = egg:swift#recon
|
||||
# log_level = INFO
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# interval = 300
|
||||
# interval = 300.0
|
||||
# concurrency = 4
|
||||
# node_timeout = 3
|
||||
# conn_timeout = 0.5
|
||||
@ -260,7 +260,7 @@ use = egg:swift#recon
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# Will audit each container at most once per interval
|
||||
# interval = 1800
|
||||
# interval = 1800.0
|
||||
#
|
||||
# containers_per_second = 200
|
||||
# recon_cache_path = /var/cache/swift
|
||||
@ -290,7 +290,7 @@ use = egg:swift#recon
|
||||
# sync_proxy = http://10.1.1.1:8888,http://10.1.1.2:8888
|
||||
#
|
||||
# Will sync each container at most once per interval
|
||||
# interval = 300
|
||||
# interval = 300.0
|
||||
#
|
||||
# Maximum amount of time to spend syncing each container per pass
|
||||
# container_time = 60
|
||||
@ -467,7 +467,7 @@ use = egg:swift#xprofile
|
||||
# broker_timeout = 60
|
||||
#
|
||||
# Time in seconds to wait between sharder cycles
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
#
|
||||
# Process at most this many databases per second
|
||||
# databases_per_second = 50
|
||||
|
@ -1,7 +1,7 @@
|
||||
# [DEFAULT]
|
||||
# The number of seconds between checking the modified time of this config file
|
||||
# for changes and therefore reloading it.
|
||||
# mtime_check_interval = 300
|
||||
# mtime_check_interval = 300.0
|
||||
|
||||
|
||||
# [realm1]
|
||||
|
@ -38,9 +38,9 @@
|
||||
# ionice_priority =
|
||||
|
||||
[object-expirer]
|
||||
# interval = 300
|
||||
# interval = 300.0
|
||||
# expiring_objects_account_name = expiring_objects
|
||||
# report_interval = 300
|
||||
# report_interval = 300.0
|
||||
#
|
||||
# request_tries is the number of times the expirer's internal client will
|
||||
# attempt any given request in the event of failure. The default is 3.
|
||||
|
@ -230,9 +230,9 @@ use = egg:swift#recon
|
||||
# daemonize = on
|
||||
#
|
||||
# Time in seconds to wait between replication passes
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
# run_pause is deprecated, use interval instead
|
||||
# run_pause = 30
|
||||
# run_pause = 30.0
|
||||
#
|
||||
# Number of concurrent replication jobs to run. This is per-process,
|
||||
# so replicator_workers=W and concurrency=C will result in W*C
|
||||
@ -244,7 +244,7 @@ use = egg:swift#recon
|
||||
# is done in the main process.
|
||||
# replicator_workers = 0
|
||||
#
|
||||
# stats_interval = 300
|
||||
# stats_interval = 300.0
|
||||
#
|
||||
# default is rsync, alternative is ssync
|
||||
# sync_method = rsync
|
||||
@ -277,7 +277,7 @@ use = egg:swift#recon
|
||||
# attempts to kill all workers if nothing replicates for lockup_timeout seconds
|
||||
# lockup_timeout = 1800
|
||||
#
|
||||
# ring_check_interval = 15
|
||||
# ring_check_interval = 15.0
|
||||
# recon_cache_path = /var/cache/swift
|
||||
#
|
||||
# limits how long rsync error log lines are
|
||||
@ -329,9 +329,9 @@ use = egg:swift#recon
|
||||
# daemonize = on
|
||||
#
|
||||
# Time in seconds to wait between reconstruction passes
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
# run_pause is deprecated, use interval instead
|
||||
# run_pause = 30
|
||||
# run_pause = 30.0
|
||||
#
|
||||
# Maximum number of worker processes to spawn. Each worker will handle a
|
||||
# subset of devices. Devices will be assigned evenly among the workers so that
|
||||
@ -341,11 +341,11 @@ use = egg:swift#recon
|
||||
# reconstructor_workers = 0
|
||||
#
|
||||
# concurrency = 1
|
||||
# stats_interval = 300
|
||||
# stats_interval = 300.0
|
||||
# node_timeout = 10
|
||||
# http_timeout = 60
|
||||
# lockup_timeout = 1800
|
||||
# ring_check_interval = 15
|
||||
# ring_check_interval = 15.0
|
||||
# recon_cache_path = /var/cache/swift
|
||||
# The handoffs_only mode option is for special case emergency situations during
|
||||
# rebalance such as disk full in the cluster. This option SHOULD NOT BE
|
||||
@ -398,7 +398,7 @@ use = egg:swift#recon
|
||||
# log_level = INFO
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# interval = 300
|
||||
# interval = 300.0
|
||||
# node_timeout = <whatever's in the DEFAULT section or 10>
|
||||
#
|
||||
# updater_workers controls how many processes the object updater will
|
||||
@ -420,7 +420,7 @@ use = egg:swift#recon
|
||||
# logging is per-process, so with concurrency > 1, the logs will
|
||||
# contain one stats log per worker process every report_interval
|
||||
# seconds.
|
||||
# report_interval = 300
|
||||
# report_interval = 300.0
|
||||
#
|
||||
# recon_cache_path = /var/cache/swift
|
||||
#
|
||||
@ -444,7 +444,7 @@ use = egg:swift#recon
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# Time in seconds to wait between auditor passes
|
||||
# interval = 30
|
||||
# interval = 30.0
|
||||
#
|
||||
# You can set the disk chunk size that the auditor uses making it larger if
|
||||
# you like for more efficient local auditing of larger objects
|
||||
@ -537,9 +537,9 @@ use = egg:swift#recon
|
||||
# log_level = INFO
|
||||
# log_address = /dev/log
|
||||
#
|
||||
# interval = 300
|
||||
# interval = 300.0
|
||||
#
|
||||
# report_interval = 300
|
||||
# report_interval = 300.0
|
||||
#
|
||||
# request_tries is the number of times the expirer's internal client will
|
||||
# attempt any given request in the event of failure. The default is 3.
|
||||
|
@ -168,7 +168,7 @@ use = egg:swift#proxy
|
||||
# How long without an error before a node's error count is reset. This will
|
||||
# also be how long before a node is reenabled after suppression is triggered.
|
||||
# Set to 0 to disable error-limiting.
|
||||
# error_suppression_interval = 60
|
||||
# error_suppression_interval = 60.0
|
||||
#
|
||||
# How many errors can accumulate before a node is temporarily ignored.
|
||||
# error_suppression_limit = 10
|
||||
|
@ -65,7 +65,7 @@ class AccountReaper(Daemon):
|
||||
self.logger = logger or get_logger(conf, log_route='account-reaper')
|
||||
self.devices = conf.get('devices', '/srv/node')
|
||||
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
|
||||
self.interval = int(conf.get('interval', 3600))
|
||||
self.interval = float(conf.get('interval', 3600))
|
||||
self.swift_dir = conf.get('swift_dir', '/etc/swift')
|
||||
self.account_ring = None
|
||||
self.container_ring = None
|
||||
|
@ -44,7 +44,7 @@ class DatabaseAuditor(Daemon):
|
||||
self.server_type))
|
||||
self.devices = conf.get('devices', '/srv/node')
|
||||
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
|
||||
self.interval = int(conf.get('interval', 1800))
|
||||
self.interval = float(conf.get('interval', 1800))
|
||||
self.logging_interval = 3600 # once an hour
|
||||
self.passes = 0
|
||||
self.failures = 0
|
||||
|
@ -196,7 +196,7 @@ class Replicator(Daemon):
|
||||
self._local_device_ids = set()
|
||||
self.per_diff = int(conf.get('per_diff', 1000))
|
||||
self.max_diffs = int(conf.get('max_diffs') or 100)
|
||||
self.interval = int(conf.get('interval') or
|
||||
self.interval = float(conf.get('interval') or
|
||||
conf.get('run_pause') or 30)
|
||||
if 'run_pause' in conf:
|
||||
if 'interval' in conf:
|
||||
|
@ -897,7 +897,7 @@ class ServersPerPortStrategy(StrategyBase):
|
||||
super(ServersPerPortStrategy, self).__init__(conf, logger)
|
||||
self.servers_per_port = servers_per_port
|
||||
self.swift_dir = conf.get('swift_dir', '/etc/swift')
|
||||
self.ring_check_interval = int(conf.get('ring_check_interval', 15))
|
||||
self.ring_check_interval = float(conf.get('ring_check_interval', 15))
|
||||
|
||||
bind_ip = conf.get('bind_ip', '0.0.0.0')
|
||||
self.cache = BindPortsCache(self.swift_dir, bind_ip)
|
||||
|
@ -362,7 +362,7 @@ class ContainerReconciler(Daemon):
|
||||
# marker will be retried before it is abandoned. It is not coupled
|
||||
# with the tombstone reclaim age in the consistency engine.
|
||||
self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7))
|
||||
self.interval = int(conf.get('interval', 30))
|
||||
self.interval = float(conf.get('interval', 30))
|
||||
conf_path = conf.get('__file__') or \
|
||||
'/etc/swift/container-reconciler.conf'
|
||||
self.logger = get_logger(conf, log_route='container-reconciler')
|
||||
|
@ -171,7 +171,7 @@ class ContainerSync(Daemon):
|
||||
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
|
||||
#: Minimum time between full scans. This is to keep the daemon from
|
||||
#: running wild on near empty systems.
|
||||
self.interval = int(conf.get('interval', 300))
|
||||
self.interval = float(conf.get('interval', 300))
|
||||
#: Maximum amount of time to spend syncing a container before moving on
|
||||
#: to the next one. If a container sync hasn't finished in this time,
|
||||
#: it'll just be resumed next scan.
|
||||
|
@ -47,7 +47,7 @@ class ContainerUpdater(Daemon):
|
||||
self.devices = conf.get('devices', '/srv/node')
|
||||
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
|
||||
self.swift_dir = conf.get('swift_dir', '/etc/swift')
|
||||
self.interval = int(conf.get('interval', 300))
|
||||
self.interval = float(conf.get('interval', 300))
|
||||
self.account_ring = None
|
||||
self.concurrency = int(conf.get('concurrency', 4))
|
||||
if 'slowdown' in conf:
|
||||
|
@ -323,7 +323,7 @@ class ObjectAuditor(Daemon):
|
||||
self.recon_cache_path = conf.get('recon_cache_path',
|
||||
'/var/cache/swift')
|
||||
self.rcache = join(self.recon_cache_path, "object.recon")
|
||||
self.interval = int(conf.get('interval', 30))
|
||||
self.interval = float(conf.get('interval', 30))
|
||||
|
||||
watcher_names = set(list_from_csv(conf.get('watchers', '')))
|
||||
# Normally '__file__' is always in config, but tests neglect it often.
|
||||
|
@ -78,7 +78,7 @@ class ObjectExpirer(Daemon):
|
||||
def __init__(self, conf, logger=None, swift=None):
|
||||
self.conf = conf
|
||||
self.logger = logger or get_logger(conf, log_route='object-expirer')
|
||||
self.interval = int(conf.get('interval') or 300)
|
||||
self.interval = float(conf.get('interval') or 300)
|
||||
self.tasks_per_second = float(conf.get('tasks_per_second', 50.0))
|
||||
|
||||
self.conf_path = \
|
||||
@ -99,7 +99,7 @@ class ObjectExpirer(Daemon):
|
||||
|
||||
self.read_conf_for_queue_access(swift)
|
||||
|
||||
self.report_interval = int(conf.get('report_interval') or 300)
|
||||
self.report_interval = float(conf.get('report_interval') or 300)
|
||||
self.report_first_time = self.report_last_time = time()
|
||||
self.report_objects = 0
|
||||
self.recon_cache_path = conf.get('recon_cache_path',
|
||||
|
@ -179,11 +179,11 @@ class ObjectReconstructor(Daemon):
|
||||
self.reconstructor_workers = int(conf.get('reconstructor_workers', 0))
|
||||
self.policies = [policy for policy in POLICIES
|
||||
if policy.policy_type == EC_POLICY]
|
||||
self.stats_interval = int(conf.get('stats_interval', '300'))
|
||||
self.ring_check_interval = int(conf.get('ring_check_interval', 15))
|
||||
self.stats_interval = float(conf.get('stats_interval', '300'))
|
||||
self.ring_check_interval = float(conf.get('ring_check_interval', 15))
|
||||
self.next_check = time.time() + self.ring_check_interval
|
||||
self.partition_times = []
|
||||
self.interval = int(conf.get('interval') or
|
||||
self.interval = float(conf.get('interval') or
|
||||
conf.get('run_pause') or 30)
|
||||
if 'run_pause' in conf:
|
||||
if 'interval' in conf:
|
||||
|
@ -142,12 +142,12 @@ class ObjectReplicator(Daemon):
|
||||
self.replicator_workers = int(conf.get('replicator_workers', 0))
|
||||
self.policies = [policy for policy in POLICIES
|
||||
if policy.policy_type == REPL_POLICY]
|
||||
self.stats_interval = int(conf.get('stats_interval', '300'))
|
||||
self.ring_check_interval = int(conf.get('ring_check_interval', 15))
|
||||
self.stats_interval = float(conf.get('stats_interval', '300'))
|
||||
self.ring_check_interval = float(conf.get('ring_check_interval', 15))
|
||||
self.next_check = time.time() + self.ring_check_interval
|
||||
self.replication_cycle = random.randint(0, 9)
|
||||
self.partition_times = []
|
||||
self.interval = int(conf.get('interval') or
|
||||
self.interval = float(conf.get('interval') or
|
||||
conf.get('run_pause') or 30)
|
||||
if 'run_pause' in conf:
|
||||
if 'interval' in conf:
|
||||
|
@ -93,7 +93,7 @@ class ObjectUpdater(Daemon):
|
||||
self.devices = conf.get('devices', '/srv/node')
|
||||
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
|
||||
self.swift_dir = conf.get('swift_dir', '/etc/swift')
|
||||
self.interval = int(conf.get('interval', 300))
|
||||
self.interval = float(conf.get('interval', 300))
|
||||
self.container_ring = None
|
||||
self.concurrency = int(conf.get('concurrency', 8))
|
||||
self.updater_workers = int(conf.get('updater_workers', 1))
|
||||
|
@ -103,7 +103,7 @@ class TestContainerUpdater(unittest.TestCase):
|
||||
'devices': '/some/where/else',
|
||||
'mount_check': 'huh?',
|
||||
'swift_dir': '/not/here',
|
||||
'interval': '600',
|
||||
'interval': '600.1',
|
||||
'concurrency': '2',
|
||||
'containers_per_second': '10.5',
|
||||
}
|
||||
@ -111,7 +111,7 @@ class TestContainerUpdater(unittest.TestCase):
|
||||
self.assertEqual(daemon.devices, '/some/where/else')
|
||||
self.assertEqual(daemon.mount_check, False)
|
||||
self.assertEqual(daemon.swift_dir, '/not/here')
|
||||
self.assertEqual(daemon.interval, 600)
|
||||
self.assertEqual(daemon.interval, 600.1)
|
||||
self.assertEqual(daemon.concurrency, 2)
|
||||
self.assertEqual(daemon.max_containers_per_second, 10.5)
|
||||
|
||||
@ -124,7 +124,6 @@ class TestContainerUpdater(unittest.TestCase):
|
||||
container_updater.ContainerUpdater(conf)
|
||||
|
||||
check_bad({'interval': 'foo'})
|
||||
check_bad({'interval': '300.0'})
|
||||
check_bad({'concurrency': 'bar'})
|
||||
check_bad({'concurrency': '1.0'})
|
||||
check_bad({'slowdown': 'baz'})
|
||||
|
@ -131,7 +131,7 @@ class TestObjectUpdater(unittest.TestCase):
|
||||
'devices': '/some/where/else',
|
||||
'mount_check': 'huh?',
|
||||
'swift_dir': '/not/here',
|
||||
'interval': '600',
|
||||
'interval': '600.1',
|
||||
'concurrency': '2',
|
||||
'updater_workers': '3',
|
||||
'objects_per_second': '10.5',
|
||||
@ -140,7 +140,7 @@ class TestObjectUpdater(unittest.TestCase):
|
||||
self.assertEqual(daemon.devices, '/some/where/else')
|
||||
self.assertEqual(daemon.mount_check, False)
|
||||
self.assertEqual(daemon.swift_dir, '/not/here')
|
||||
self.assertEqual(daemon.interval, 600)
|
||||
self.assertEqual(daemon.interval, 600.1)
|
||||
self.assertEqual(daemon.concurrency, 2)
|
||||
self.assertEqual(daemon.updater_workers, 3)
|
||||
self.assertEqual(daemon.max_objects_per_second, 10.5)
|
||||
@ -155,7 +155,6 @@ class TestObjectUpdater(unittest.TestCase):
|
||||
object_updater.ObjectUpdater(conf, logger=self.logger)
|
||||
|
||||
check_bad({'interval': 'foo'})
|
||||
check_bad({'interval': '300.0'})
|
||||
check_bad({'concurrency': 'bar'})
|
||||
check_bad({'concurrency': '1.0'})
|
||||
check_bad({'slowdown': 'baz'})
|
||||
|
Loading…
Reference in New Issue
Block a user