]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/rbd_support: check whether mirroring is enabled
authorRamana Raja <rraja@redhat.com>
Tue, 6 May 2025 00:07:18 +0000 (20:07 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 23 Jun 2025 07:36:04 +0000 (09:36 +0200)
commit017a3847f560838333a083878929d02a1bb26232
treedb67fa7d2b525ed4e28dde06d71590fb98b2ebd2
parentc16bdd3ef1844e7f72fba4af7163d3a1ab741336
pybind/mgr/rbd_support: check whether mirroring is enabled

... before fetching the mirroring mode of the image.

In the CreateSnapshotRequests class, which asynchronously issues mirror
snapshot creation requests, prevalidation includes checking that the
image is enabled for snapshot-based mirroring and is marked as primary.
Since mirroring mode can only be queried if mirroring is already
enabled, the code first fetches the image’s mirroring info to verify
that mirroring is enabled, and only then retrieves the mirroring mode.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit b3f1d2d183d330d80d4e539e3a038f30586a2de0)
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py