]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
worker: treat 404 as an empty marker
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 25 Oct 2013 20:04:14 +0000 (13:04 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sat, 26 Oct 2013 01:31:51 +0000 (18:31 -0700)
If the log does not exist at all, since no operations have been completed
on that bucket, we get a 404.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
radosgw_agent/worker.py

index 243ac458aa63b81376fd67752411014a8fbe05f8..d81f4ead7dc2e035d8602a45a145a2e80373d56f 100644 (file)
@@ -333,8 +333,11 @@ class DataWorkerFull(DataWorker):
     def full_sync_bucket(self, bucket):
         try:
             instance = self.get_bucket_instance(bucket)
-            marker = client.get_log_info(self.src_conn, 'bucket-index',
-                                         instance)['max_marker']
+            try:
+                marker = client.get_log_info(self.src_conn, 'bucket-index',
+                                             instance)['max_marker']
+            except client.NotFound:
+                marker = ''
             log.debug('bucket instance is "%s" with marker %s', instance, marker)
             # nothing to do for this bucket
             if not marker: