]> 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 68536/head
authorAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Tue, 21 Apr 2026 09:52:08 +0000 (15:22 +0530)
committerAfreen Misbah <afreen@ibm.com>
Fri, 8 May 2026 22:34:17 +0000 (04:04 +0530)
Fixes: https://tracker.ceph.com/issues/76163
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
(cherry picked from commit 513686eaf76d1cf2f70c8e828003dd242f39c729)

Conflicts:
src/pybind/mgr/dashboard/services/rgw_client.py

src/pybind/mgr/dashboard/services/rgw_client.py

index 23ea7dca9ca798de95a2c64177135aa0b3ffd29d..6a77bc122e112fb7113008d3d49f4e522affc4ee 100755 (executable)
@@ -2484,12 +2484,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: