From: Aashish Sharma Date: Tue, 21 Apr 2026 09:52:08 +0000 (+0530) Subject: mgr/dashboard: remove sync_from entry when sync_from_all is true X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68490%2Fhead;p=ceph.git mgr/dashboard: remove sync_from entry when sync_from_all is true Fixes: https://tracker.ceph.com/issues/76163 Signed-off-by: Aashish Sharma --- 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: