]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: bucket sync status not 'caught up' during full sync 30170/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 17 Jul 2019 17:59:19 +0000 (13:59 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 5 Sep 2019 09:21:50 +0000 (11:21 +0200)
the 'radosgw-admin bucket sync status' command will incorrectly report
that the "bucket is caught up with source" if some shards are still on
full sync

Fixes: http://tracker.ceph.com/issues/40806
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9e05341a53d4cbb6f5d2018b8f29c1a32e0506a9)

src/rgw/rgw_admin.cc

index 81fd13ef55c3e0ebc84c12b48f470ae5a3eed483..93a69fdb0925046e05b2e6e117c1d55d11c2d999 100644 (file)
@@ -2415,11 +2415,11 @@ static int bucket_source_sync_status(RGWRados *store, const RGWZone& zone,
       shards_behind.insert(shard_id);
     }
   }
-  if (shards_behind.empty()) {
-    out << indented{width} << "bucket is caught up with source\n";
-  } else {
+  if (!shards_behind.empty()) {
     out << indented{width} << "bucket is behind on " << shards_behind.size() << " shards\n";
     out << indented{width} << "behind shards: [" << shards_behind << "]\n" ;
+  } else if (!num_full) {
+    out << indented{width} << "bucket is caught up with source\n";
   }
   return 0;
 }