]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: remove sync_from entry when sync_from_all is true 68490/head
authorAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Tue, 21 Apr 2026 09:52:08 +0000 (15:22 +0530)
committerAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Tue, 21 Apr 2026 15:25:32 +0000 (20:55 +0530)
Fixes: https://tracker.ceph.com/issues/76163
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
src/pybind/mgr/dashboard/services/rgw_client.py

index 881cb0c63723d9236b369c43acb300f3811c136d..ee47ea7a72626c8029a3e2560c96ff6383978be2 100755 (executable)
@@ -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: