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)
pool_id, namespace, image_id,
"snapshot mirroring is not enabled"))
self.close_image(image_spec, image)
+ return
self.get_mirror_info(image_spec, image)