Skip to content

Commit

Permalink
object replicator logging and increase rsync timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
redbo committed Jan 27, 2011
1 parent d1f3dfb commit 304ea48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions etc/object-server.conf-sample
Expand Up @@ -42,13 +42,13 @@ use = egg:swift#object
# concurrency = 1
# stats_interval = 300
# max duration of a partition rsync
# rsync_timeout = 600
# rsync_timeout = 900
# passed to rsync for io op timeout
# rsync_io_timeout = 10
# rsync_io_timeout = 30
# max duration of an http request
# http_timeout = 60
# attempts to kill all workers if nothing replicates for lockup_timeout seconds
# lockup_timeout = 900
# lockup_timeout = 1800
# The replicator also performs reclamation
# reclaim_age = 604800

Expand All @@ -71,4 +71,4 @@ use = egg:swift#object
# log_level = INFO
# files_per_second = 20
# bytes_per_second = 10000000
# log_time = 3600
# log_time = 3600
11 changes: 7 additions & 4 deletions swift/obj/replicator.py
Expand Up @@ -223,10 +223,10 @@ def __init__(self, conf):
self.reclaim_age = int(conf.get('reclaim_age', 86400 * 7))
self.partition_times = []
self.run_pause = int(conf.get('run_pause', 30))
self.rsync_timeout = int(conf.get('rsync_timeout', 300))
self.rsync_io_timeout = conf.get('rsync_io_timeout', '10')
self.rsync_timeout = int(conf.get('rsync_timeout', 900))
self.rsync_io_timeout = conf.get('rsync_io_timeout', '30')
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):
"""
Expand All @@ -252,7 +252,10 @@ def _rsync(self, args):
continue
if result.startswith('cd+'):
continue
self.logger.info(result)
if not retval:
self.logger.info(result)
else:
self.logger.error(result)
if ret_val:
self.logger.error(_('Bad rsync return code: %(args)s -> %(ret)d'),
{'args': str(args), 'ret': ret_val})
Expand Down

0 comments on commit 304ea48

Please sign in to comment.