From 9e05341a53d4cbb6f5d2018b8f29c1a32e0506a9 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 17 Jul 2019 13:59:19 -0400 Subject: [PATCH] radosgw-admin: bucket sync status not 'caught up' during full sync 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 --- src/rgw/rgw_admin.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 96b4241aea7..424246c7ad2 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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; } -- 2.39.5