From fb8c4f514d24bf0edc68a2f7431fcaf7990dac1b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 10 Feb 2021 16:30:49 +0800 Subject: [PATCH] mgr/rbd_support: bail out when snapshot mirroring is not enabled before this change, we continue on and try to get mirror info of specified image after calling close_image(), even the snapshot mirroring is not enabled. after this change, we bail out after calling close_image(). this behavior is consistent with other places where we handle errors. Fixes: https://tracker.ceph.com/issues/49355 Signed-off-by: Kefu Chai (cherry picked from commit 8372d9370b530f953acd5bd6502c46fd11f43109) --- src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py b/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py index 9751d44e4a3..e5a14e46787 100644 --- a/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py +++ b/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py @@ -263,6 +263,7 @@ class CreateSnapshotRequests: pool_id, namespace, image_id, "snapshot mirroring is not enabled")) self.close_image(image_spec, image) + return self.get_mirror_info(image_spec, image) -- 2.47.3