From: Alfredo Deza Date: Fri, 27 Mar 2015 16:06:39 +0000 (-0400) Subject: full sync of a bucket with better logging X-Git-Tag: v1.2.2~3^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfb1127cae029d77c1bc4e7c7f544fa681209063;p=radosgw-agent.git full sync of a bucket with better logging Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/worker.py b/radosgw_agent/worker.py index b92361c..3b5a255 100644 --- a/radosgw_agent/worker.py +++ b/radosgw_agent/worker.py @@ -293,25 +293,29 @@ class DataWorker(Worker): return bucket_instance.split(':', 1)[0] def sync_bucket(self, bucket, objects): + log.info('*'*80) log.info('syncing bucket "%s"', bucket) retry_objs = [] count = 0 + left = len(objects) + log.info('objects to sync: %s' % len(objects)) for obj in objects: count += 1 + left -= 1 # sync each object - log.debug('syncing object "%s/%s"', bucket, obj.name), + log.info('syncing object "%s/%s"', bucket, obj.name), + log.info('%s objects left to sync in bucket (%s)' % (left, bucket)) try: self.sync_object(bucket, obj) except SyncError as err: log.error('failed to sync object %s/%s: %s', bucket, obj.name, err) + log.warning( + 'will retry sync of failed object at next incremental sync' + ) retry_objs.append(obj) - - log.debug('bucket {bucket} has {num_objects} object'.format( - bucket=bucket, num_objects=count)) - if retry_objs: - log.debug('these objects failed to be synced and will be during ' - 'the next incremental sync: %s', retry_objs) + log.info('completed syncing bucket "%s"', bucket) + log.info('*'*80) return retry_objs