]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: bail out when snapshot mirroring is not enabled 39741/head
authorKefu Chai <kchai@redhat.com>
Wed, 10 Feb 2021 08:30:49 +0000 (16:30 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 28 Feb 2021 04:40:10 +0000 (12:40 +0800)
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 <kchai@redhat.com>
(cherry picked from commit 8372d9370b530f953acd5bd6502c46fd11f43109)

src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py

index 9751d44e4a3dde655c1e8df926a55f36cf549cd3..e5a14e46787769c7ab9be1c6299caa2bbc500aff 100644 (file)
@@ -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)