object replicator logging and increase rsync timeouts

This commit is contained in:
Michael Barton 2011-01-27 21:02:53 +00:00
parent d1f3dfb4ef
commit 304ea48213
2 changed files with 11 additions and 8 deletions

View File

@ -42,13 +42,13 @@ use = egg:swift#object
# concurrency = 1 # concurrency = 1
# stats_interval = 300 # stats_interval = 300
# max duration of a partition rsync # max duration of a partition rsync
# rsync_timeout = 600 # rsync_timeout = 900
# passed to rsync for io op timeout # passed to rsync for io op timeout
# rsync_io_timeout = 10 # rsync_io_timeout = 30
# max duration of an http request # max duration of an http request
# http_timeout = 60 # http_timeout = 60
# attempts to kill all workers if nothing replicates for lockup_timeout seconds # attempts to kill all workers if nothing replicates for lockup_timeout seconds
# lockup_timeout = 900 # lockup_timeout = 1800
# The replicator also performs reclamation # The replicator also performs reclamation
# reclaim_age = 604800 # reclaim_age = 604800
@ -71,4 +71,4 @@ use = egg:swift#object
# log_level = INFO # log_level = INFO
# files_per_second = 20 # files_per_second = 20
# bytes_per_second = 10000000 # bytes_per_second = 10000000
# log_time = 3600 # log_time = 3600

View File

@ -223,10 +223,10 @@ class ObjectReplicator(Daemon):
self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7)) self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7))
self.partition_times = [] self.partition_times = []
self.run_pause = int(conf.get('run_pause', 30)) self.run_pause = int(conf.get('run_pause', 30))
self.rsync_timeout = int(conf.get('rsync_timeout', 300)) self.rsync_timeout = int(conf.get('rsync_timeout', 900))
self.rsync_io_timeout = conf.get('rsync_io_timeout', '10') self.rsync_io_timeout = conf.get('rsync_io_timeout', '30')
self.http_timeout = int(conf.get('http_timeout', 60)) self.http_timeout = int(conf.get('http_timeout', 60))
self.lockup_timeout = int(conf.get('lockup_timeout', 900)) self.lockup_timeout = int(conf.get('lockup_timeout', 1800))
def _rsync(self, args): def _rsync(self, args):
""" """
@ -252,7 +252,10 @@ class ObjectReplicator(Daemon):
continue continue
if result.startswith('cd+'): if result.startswith('cd+'):
continue continue
self.logger.info(result) if not retval:
self.logger.info(result)
else:
self.logger.error(result)
if ret_val: if ret_val:
self.logger.error(_('Bad rsync return code: %(args)s -> %(ret)d'), self.logger.error(_('Bad rsync return code: %(args)s -> %(ret)d'),
{'args': str(args), 'ret': ret_val}) {'args': str(args), 'ret': ret_val})