From 513686eaf76d1cf2f70c8e828003dd242f39c729 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Tue, 21 Apr 2026 15:22:08 +0530 Subject: [PATCH] mgr/dashboard: remove sync_from entry when sync_from_all is true Fixes: https://tracker.ceph.com/issues/76163 Signed-off-by: Aashish Sharma --- src/pybind/mgr/dashboard/services/rgw_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index 881cb0c63723..ee47ea7a7262 100755 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -2461,12 +2461,14 @@ class RgwMultisite: if tier_type is not None: rgw_zone_modify_cmd.append('--tier-type') rgw_zone_modify_cmd.append(tier_type) - if sync_from is not None: - rgw_zone_modify_cmd.append('--sync-from') - rgw_zone_modify_cmd.append(sync_from) if sync_from_all is not None: rgw_zone_modify_cmd.append('--sync-from-all') rgw_zone_modify_cmd.append(str(sync_from_all).lower()) + if sync_from is not None: + sync_from_all_enabled = ( + sync_from_all is not None and str(sync_from_all).lower() == 'true') + sync_from_option = '--sync-from-rm' if sync_from_all_enabled else '--sync-from' + rgw_zone_modify_cmd.extend([sync_from_option, sync_from]) try: exit_code, _, err = mgr.send_rgwadmin_command(rgw_zone_modify_cmd) if exit_code > 0: -- 2.47.3