diff --git a/doc/manpages/account-server.conf.5 b/doc/manpages/account-server.conf.5 index c98b679b44..b60baeb60d 100644 --- a/doc/manpages/account-server.conf.5 +++ b/doc/manpages/account-server.conf.5 @@ -185,7 +185,7 @@ This caps how long the replicator will spend trying to sync a given database per .IP \fBconcurrency\fR Number of replication workers to spawn. The default is 8. .IP "\fBrun_pause [deprecated]\fR" -Time in seconds to wait between replication passes. The default is 10. +Time in seconds to wait between replication passes. The default is 30. .IP \fBinterval\fR Replaces run_pause with the more standard "interval", which means the replicator won't pause unless it takes less than the interval set. The default is 30. .IP \fBerror_suppression_interval\fR diff --git a/doc/manpages/container-server.conf.5 b/doc/manpages/container-server.conf.5 index 93408cf7ad..2cd1623dc1 100644 --- a/doc/manpages/container-server.conf.5 +++ b/doc/manpages/container-server.conf.5 @@ -191,7 +191,7 @@ This caps how long the replicator will spend trying to sync a given database per .IP \fBconcurrency\fR Number of replication workers to spawn. The default is 8. .IP "\fBrun_pause [deprecated]\fR" -Time in seconds to wait between replication passes. The default is 10. +Time in seconds to wait between replication passes. The default is 30. .IP \fBinterval\fR Replaces run_pause with the more standard "interval", which means the replicator won't pause unless it takes less than the interval set. The default is 30. .IP \fBnode_timeout\fR diff --git a/doc/manpages/object-server.conf.5 b/doc/manpages/object-server.conf.5 index 14e8a58b3b..fb2297421a 100644 --- a/doc/manpages/object-server.conf.5 +++ b/doc/manpages/object-server.conf.5 @@ -187,7 +187,9 @@ Logging address. The default is /dev/log. Indicates that you are using a VM environment. The default is no. .IP \fBdaemonize\fR Whether or not to run replication as a daemon. The default is yes. -.IP \fBrun_pause\fR +.IP "\fBrun_pause [deprecated]\fR" +Time in seconds to wait between replication passes. The default is 30. +.IP \fBinterval\fR Time in seconds to wait between replication passes. The default is 30. .IP \fBconcurrency\fR Number of replication workers to spawn. The default is 1. diff --git a/doc/source/deployment_guide.rst b/doc/source/deployment_guide.rst index 0b40bb8568..552dfea314 100644 --- a/doc/source/deployment_guide.rst +++ b/doc/source/deployment_guide.rst @@ -465,7 +465,7 @@ log_facility LOG_LOCAL0 Syslog log facility log_level INFO Logging level daemonize yes Whether or not to run replication as a daemon -run_pause 30 Time in seconds to wait between +interval 30 Time in seconds to wait between replication passes concurrency 1 Number of replication workers to spawn timeout 5 Timeout value sent to rsync --timeout @@ -614,7 +614,7 @@ log_level INFO Logging level per_diff 1000 concurrency 8 Number of replication workers to spawn -run_pause 30 Time in seconds to wait between +interval 30 Time in seconds to wait between replication passes node_timeout 10 Request timeout to external services conn_timeout 0.5 Connection timeout to external @@ -742,7 +742,7 @@ log_facility LOG_LOCAL0 Syslog log facility log_level INFO Logging level per_diff 1000 concurrency 8 Number of replication workers to spawn -run_pause 30 Time in seconds to wait between +interval 30 Time in seconds to wait between replication passes node_timeout 10 Request timeout to external services conn_timeout 0.5 Connection timeout to external services diff --git a/etc/account-server.conf-sample b/etc/account-server.conf-sample index 98c97acf6f..3631986fa2 100644 --- a/etc/account-server.conf-sample +++ b/etc/account-server.conf-sample @@ -94,7 +94,11 @@ use = egg:swift#recon # per_diff = 1000 # max_diffs = 100 # concurrency = 8 +# +# Time in seconds to wait between replication passes # interval = 30 +# run_pause is deprecated, use interval instead +# run_pause = 30 # # 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. @@ -109,11 +113,6 @@ use = egg:swift#recon # The replicator also performs reclamation # 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 -# # Allow rsync to compress data which is transmitted to destination node # during sync. However, this is applicable only when destination node is in # a different region than the local one. diff --git a/etc/container-server.conf-sample b/etc/container-server.conf-sample index f09aa66fd7..54daee1e8e 100644 --- a/etc/container-server.conf-sample +++ b/etc/container-server.conf-sample @@ -103,18 +103,18 @@ use = egg:swift#recon # per_diff = 1000 # max_diffs = 100 # concurrency = 8 +# +# Time in seconds to wait between replication passes # interval = 30 +# run_pause is deprecated, use interval instead +# run_pause = 30 +# # node_timeout = 10 # conn_timeout = 0.5 # # The replicator also performs reclamation # 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 -# # Allow rsync to compress data which is transmitted to destination node # during sync. However, this is applicable only when destination node is in # a different region than the local one. diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index a3f76ceb92..4fafa7c18b 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -155,7 +155,12 @@ use = egg:swift#recon # # vm_test_mode = no # daemonize = on +# +# Time in seconds to wait between replication passes +# interval = 30 +# run_pause is deprecated, use interval instead # run_pause = 30 +# # concurrency = 1 # stats_interval = 300 # @@ -230,7 +235,12 @@ use = egg:swift#recon # log_address = /dev/log # # daemonize = on +# +# Time in seconds to wait between reconstruction passes +# interval = 30 +# run_pause is deprecated, use interval instead # run_pause = 30 +# # concurrency = 1 # stats_interval = 300 # node_timeout = 10 diff --git a/swift/obj/reconstructor.py b/swift/obj/reconstructor.py index d5478a1d5e..f9aa5f15d8 100644 --- a/swift/obj/reconstructor.py +++ b/swift/obj/reconstructor.py @@ -126,7 +126,8 @@ class ObjectReconstructor(Daemon): self.next_check = time.time() + self.ring_check_interval self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7)) self.partition_times = [] - self.run_pause = int(conf.get('run_pause', 30)) + self.interval = int(conf.get('interval') or + conf.get('run_pause') or 30) self.http_timeout = int(conf.get('http_timeout', 60)) self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) self.recon_cache_path = conf.get('recon_cache_path', @@ -920,5 +921,5 @@ class ObjectReconstructor(Daemon): 'object_reconstruction_last': time.time()}, self.rcache, self.logger) self.logger.debug('reconstruction sleeping for %s seconds.', - self.run_pause) - sleep(self.run_pause) + self.interval) + sleep(self.interval) diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index 402de63af3..d23624b382 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -72,7 +72,8 @@ class ObjectReplicator(Daemon): self.next_check = time.time() + self.ring_check_interval self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7)) self.partition_times = [] - self.run_pause = int(conf.get('run_pause', 30)) + self.interval = int(conf.get('interval') or + conf.get('run_pause') or 30) self.rsync_timeout = int(conf.get('rsync_timeout', 900)) self.rsync_io_timeout = conf.get('rsync_io_timeout', '30') self.rsync_bwlimit = conf.get('rsync_bwlimit', '0') @@ -651,5 +652,5 @@ class ObjectReplicator(Daemon): 'object_replication_last': time.time()}, self.rcache, self.logger) self.logger.debug('Replication sleeping for %s seconds.', - self.run_pause) - sleep(self.run_pause) + self.interval) + sleep(self.interval)