Project

General

Profile

Bug #19130

Enabling mirroring for a pool wiht clones may fail

Added by Mykola Golub 5 months ago. Updated 5 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/02/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

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

Copied to rbd - Backport #19227: kraken: rbd: Enabling mirroring for a pool wiht clones may fail Resolved
Copied to rbd - Backport #19228: jewel: Enabling mirroring for a pool wiht clones may fail In Progress

History

#1 Updated by Mykola Golub 5 months ago

  • Status changed from New to Need Review
  • Backport set to kraken,jewel

#2 Updated by Jason Dillaman 5 months ago

  • Status changed from Need Review to Pending Backport

#3 Updated by Nathan Cutler 5 months ago

  • Copied to Backport #19227: kraken: rbd: Enabling mirroring for a pool wiht clones may fail added

#4 Updated by Nathan Cutler 5 months ago

  • Copied to Backport #19228: jewel: Enabling mirroring for a pool wiht clones may fail added

Also available in: Atom PDF