Skip to content

Commit ff7aa42

Browse files
author
Aashish Sharma
committed
mgr/dashboard: fix setting compression type while editing rgw zone
Fixes: https://tracker.ceph.com/issues/68176 Signed-off-by: Aashish Sharma <[email protected]>
1 parent 9bc0f19 commit ff7aa42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,8 +1748,9 @@ def add_storage_class_zone(self, zone_name: str, placement_target: str, storage_
17481748
rgw_zone_add_storage_class_cmd = ['zone', 'placement', 'add', '--rgw-zone', zone_name,
17491749
'--placement-id', placement_target,
17501750
'--storage-class', storage_class,
1751-
'--data-pool', data_pool,
1752-
'--compression', compression]
1751+
'--data-pool', data_pool]
1752+
if compression:
1753+
rgw_zone_add_storage_class_cmd.extend(['--compression', compression])
17531754
try:
17541755
exit_code, _, err = mgr.send_rgwadmin_command(rgw_zone_add_storage_class_cmd)
17551756
if exit_code > 0:

0 commit comments

Comments
 (0)