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: v20.0.0~977^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff7aa420b1abc5b1ecc03804ccc6fe8bdb962704;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 --- diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index 081e41650722..16fa9fcd35ce 100755 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -1748,8 +1748,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: