Project

General

Profile

Actions

Bug #19130

closed

Enabling mirroring for a pool wiht clones may fail

Added by Mykola Golub about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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)

Related issues 2 (0 open2 closed)

Copied to rbd - Backport #19227: kraken: rbd: Enabling mirroring for a pool wiht clones may failResolvedMykola GolubActions
Copied to rbd - Backport #19228: jewel: Enabling mirroring for a pool wiht clones may failResolvedNathan CutlerActions
Actions

Also available in: Atom PDF