]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: fix bucket checkpoint 8981/head
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 6 May 2016 22:32:50 +0000 (15:32 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 6 May 2016 22:32:50 +0000 (15:32 -0700)
Can refer to the incremental sync marker only if bucket is in the incremental
sync state.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/test/rgw/test_multi.py

index 88626851a659c9146dd0f9d8adfe05d5606e18df..92b36bd7612d3c85256310d6d21e2c965286158d 100644 (file)
@@ -323,7 +323,10 @@ class RGWRealm:
         markers={}
         for entry in sync_status:
             val = entry['val']
-            pos = val['inc_marker']['position'].split('#')[-1] # get rid of shard id; e.g., 6#00000000002.132.3 -> 00000000002.132.3
+            if val['status'] == 'incremental-sync':
+                pos = val['inc_marker']['position'].split('#')[-1] # get rid of shard id; e.g., 6#00000000002.132.3 -> 00000000002.132.3
+            else:
+                pos = ''
             markers[entry['key']] = pos
 
         return markers