]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: fix output of sync status 68567/head
authoraza547 <alexander-12345@hotmail.co.uk>
Thu, 23 Apr 2026 09:54:22 +0000 (10:54 +0100)
committeraza547 <alexander-12345@hotmail.co.uk>
Thu, 23 Apr 2026 10:05:23 +0000 (11:05 +0100)
In some error cases, the output of the radosgw-admin sync status
command is cut short because it is not flushed. This adds appropriate
flushing.

Fixes: https://tracker.ceph.com/issues/76228
Signed-off-by: Alexander Hussein-Kershaw <alexander.husseinkershaw@alianza.com>
src/rgw/radosgw-admin/radosgw-admin.cc

index 8c170273b2d969e43635719fff9fc68fe8932706..9856a3f4d4ecdda83a2edfd5439fbed02383975a 100644 (file)
@@ -2465,6 +2465,7 @@ static void get_data_sync_status(const rgw_zone_id& source_zone, list<string>& s
   ret = sync.read_sync_status(dpp(), &sync_status);
   if (ret < 0 && ret != -ENOENT) {
     push_ss(ss, status, tab) << string("failed read sync status: ") + cpp_strerror(-ret);
+    flush_ss(ss, status);
     return;
   }
 
@@ -2472,6 +2473,7 @@ static void get_data_sync_status(const rgw_zone_id& source_zone, list<string>& s
   ret = sync.read_recovering_shards(dpp(), sync_status.sync_info.num_shards, recovering_shards);
   if (ret < 0 && ret != ENOENT) {
     push_ss(ss, status, tab) << string("failed read recovering shards: ") + cpp_strerror(-ret);
+    flush_ss(ss, status);
     return;
   }
 
@@ -2529,6 +2531,7 @@ static void get_data_sync_status(const rgw_zone_id& source_zone, list<string>& s
   ret = sync.read_source_log_shards_info(dpp(), &source_shards_info);
   if (ret < 0) {
     push_ss(ss, status, tab) << string("failed to fetch source sync status: ") + cpp_strerror(-ret);
+    flush_ss(ss, status);
     return;
   }