From: aza547 Date: Thu, 23 Apr 2026 09:54:22 +0000 (+0100) Subject: radosgw-admin: fix output of sync status X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68567%2Fhead;p=ceph.git 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 --- 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; }