]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: bail out when snapshot mirroring is not enabled
authorKefu Chai <kchai@redhat.com>
Wed, 10 Feb 2021 08:30:49 +0000 (16:30 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 18 Feb 2021 14:46:51 +0000 (22:46 +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>
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py

index 88222a420dd056f5b13c596b6caa947f82d8847e..fa8bb019410a8f949b414770615c4feca6152fa3 100644 (file)
@@ -261,6 +261,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)