From: Aashish Sharma <66050535+aaSharma14@users.noreply.github.com> Date: Mon, 19 Dec 2022 06:49:58 +0000 (+0530) Subject: Merge pull request #49292 from rhcs-dashboard/rbd-mirror-improvements X-Git-Tag: v18.1.0~625 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1edef5576cbbe313d00c3d732e7aa0673db4d3f6;p=ceph.git Merge pull request #49292 from rhcs-dashboard/rbd-mirror-improvements mgr/dashboard: rbd-mirror improvements --- 1edef5576cbbe313d00c3d732e7aa0673db4d3f6 diff --cc src/pybind/mgr/dashboard/controllers/rbd.py index 8a3bc2defd9d8,dae419c1c0cf8..f3c25ca50891e --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@@ -216,19 -217,7 +226,9 @@@ class Rbd(RESTController) RbdConfiguration(pool_ioctx=ioctx, image_name=image_name).set_configuration( configuration) + if metadata: + RbdImageMetadataService(image).set_metadata(metadata) - mirror_image_info = image.mirror_image_get_info() - if enable_mirror and mirror_image_info['state'] == rbd.RBD_MIRROR_IMAGE_DISABLED: - RbdMirroringService.enable_image( - image_name, pool_name, namespace, - MIRROR_IMAGE_MODE[mirror_mode]) - elif (enable_mirror is False - and mirror_image_info['state'] == rbd.RBD_MIRROR_IMAGE_ENABLED): - RbdMirroringService.disable_image( - image_name, pool_name, namespace) - if primary and not mirror_image_info['primary']: RbdMirroringService.promote_image( image_name, pool_name, namespace)