]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
radosgw-admin: bucket sync status not 'caught up' during full sync
authorCasey Bodley <cbodley@redhat.com>
Wed, 17 Jul 2019 17:59:19 +0000 (13:59 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 17 Jul 2019 18:03:20 +0000 (14:03 -0400)
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>
src/rgw/rgw_admin.cc

index 96b4241aea7781786ea4f57b7bc017d9e723da13..424246c7ad2f9cf6ff9fb859b02637425614e347 100644 (file)
@@ -2465,11 +2465,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;
 }