Bug #19130
closedEnabling mirroring for a pool wiht clones may fail
0%
Description
When enabling RBD mirroring within a pool (rbd.mirror_mode_set(ioctx, RBD_MIRROR_MODE_POOL)), it tries to enable mirroring for every existent image in the pool in the order the images are returned by list dir. So it is possible that it tries to enable mirroring for a child image before its parent and fails with an error like below:
2017-03-02 10:47:59.908586 7ff8726bf580 -1 librbd: mirroring is not enabled for the parent
2017-03-02 10:47:59.908591 7ff8726bf580 -1 librbd: error enabling mirroring for image child: (22) Invalid argument
On teuthology it is observed as failure of jobs 'config/copy-on-read.yaml ... workloads/c_api_tests_with_journaling.yaml' in TestLibRBD.Mirror when it tries to enable mirroring for a pool that is reused from TestLibRBD.TestCoR and contains a clone.
http://pulpito.ceph.com/trociny-2017-03-01_21:04:14-rbd-wip-mgolub-testing---basic-smithi/
Or running:
CEPH_ARGS='--rbd_clone_copy_on_read=true' RBD_FEATURES=125 \ ./bin/ceph_test_librbd --gtest_filter=TestLibRBD.TestCoR:TestLibRBD.Mirror ... [ OK ] TestLibRBD.TestCoR (6705 ms) [ RUN ] TestLibRBD.Mirror /home/mgolub/ceph.ci/src/test/librbd/test_librbd.cc:5458: Failure Expected: 0 To be equal to: rbd.mirror_mode_set(ioctx, RBD_MIRROR_MODE_POOL) Which is: -22 [ FAILED ] TestLibRBD.Mirror (14 ms)
Updated by Mykola Golub about 7 years ago
- Status changed from New to Fix Under Review
- Backport set to kraken,jewel
Updated by Jason Dillaman about 7 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler about 7 years ago
- Copied to Backport #19227: kraken: rbd: Enabling mirroring for a pool wiht clones may fail added
Updated by Nathan Cutler about 7 years ago
- Copied to Backport #19228: jewel: Enabling mirroring for a pool wiht clones may fail added
Updated by Nathan Cutler over 6 years ago
- Status changed from Pending Backport to Resolved