From ea9c2058c8094d8904ddc28068efc28d4d9dac24 Mon Sep 17 00:00:00 2001 From: aza547 Date: Thu, 23 Apr 2026 10:54:22 +0100 Subject: [PATCH] radosgw-admin: fix output of sync status 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 --- src/rgw/radosgw-admin/radosgw-admin.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/radosgw-admin/radosgw-admin.cc b/src/rgw/radosgw-admin/radosgw-admin.cc index 8c170273b2d9..9856a3f4d4ec 100644 --- a/src/rgw/radosgw-admin/radosgw-admin.cc +++ b/src/rgw/radosgw-admin/radosgw-admin.cc @@ -2465,6 +2465,7 @@ static void get_data_sync_status(const rgw_zone_id& source_zone, list& 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& 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& 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; } -- 2.47.3