From: Aashish Sharma Date: Mon, 23 Sep 2024 08:28:22 +0000 (+0530) Subject: mgr/dashboard: fix setting compression type while editing rgw zone X-Git-Tag: v18.2.5~363^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F59971%2Fhead;p=ceph.git mgr/dashboard: fix setting compression type while editing rgw zone Fixes: https://tracker.ceph.com/issues/68176 Signed-off-by: Aashish Sharma (cherry picked from commit ff7aa420b1abc5b1ecc03804ccc6fe8bdb962704) --- diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index aed70260362e..b39ba30479e5 100644 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -1492,8 +1492,9 @@ class RgwMultisite: rgw_zone_add_storage_class_cmd = ['zone', 'placement', 'add', '--rgw-zone', zone_name, '--placement-id', placement_target, '--storage-class', storage_class, - '--data-pool', data_pool, - '--compression', compression] + '--data-pool', data_pool] + if compression: + rgw_zone_add_storage_class_cmd.extend(['--compression', compression]) try: exit_code, _, err = mgr.send_rgwadmin_command(rgw_zone_add_storage_class_cmd) if exit_code > 0: