Bug #58895
closed[rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring mode
0%
Description
Description of problem:
On a pool where image mode of mirroring enabled, enabling mirroring on an image in a namespace is falsely failing saying cannot enable mirroring in the current pool mirroring mode
How reproducible:
Tried twice, faced twice
Steps to Reproduce:
1. Configure mirroring between 2 clusters with image mode on a pool
2. Create an image in a namespace.
3. Try to enable mirroring on image
Actual results:
#rbd mirror image enable mi_pool/ns_0/big snapshot
2021-11-17T08:33:21.321+0000 7f4b36f9c2c0 -1 librbd::api::Mirror: image_enable: cannot enable mirroring in the current pool mirroring mode
Expected results:
Mirroring should get enabled
It can be observed that image mode is enabled on the pool
- rbd mirror pool info mi_pool
Mode: image
Site Name: site-b
Peer Sites:
UUID: 90ba0f6c-f536-48a6-b75a-b8cefa2c59ac
Name: site-a
Mirror UUID: 7f2aec45-a45e-47b8-985f-0243c774b64f
Direction: rx-tx
Client: client.rbd-mirror-peer
- rbd create mi_pool/abc --size 1M
[ceph: root@pluto006 /]# rbd mirror image enable mi_pool/abc snapshot
Mirroring enabled
Updated by Prasanna Kumar Kalever about 1 year ago
Useful comment from Ilya:
(In reply to Vasishta from comment #0)
Description of problem:
On a pool where image mode of mirroring enabled, enabling mirroring on an
image in a namespace is falsely failing saying cannot enable mirroring in
the current pool mirroring mode
Hi Vasi,
The failure is legit because mirroring mode is a per-namespace configuration. You can think of the pool itself as just an unnamed namespace. Setting mirroring mode on the pool itself doesn't set it on any of its actual namespaces.
Steps to Reproduce:
1. Configure mirroring between 2 clusters with image mode on a pool
2. Create an image in a namespace.
3. Try to enable mirroring on image
Before attempting to enable mirroring on an image in a namespace, the namespace must have mirroring enabled:
$ rbd mirror pool enable mi_pool/ns_0 image
It can be observed that image mode is enabled on the pool
- rbd mirror pool info mi_pool
Mode: image
Site Name: site-bPeer Sites:
UUID: 90ba0f6c-f536-48a6-b75a-b8cefa2c59ac
Name: site-a
Mirror UUID: 7f2aec45-a45e-47b8-985f-0243c774b64f
Direction: rx-tx
Client: client.rbd-mirror-peer
... but since it's not enabled on ns_0 namespace, if you had ran "rbd mirror pool info mi_pool/ns_0", you would have gotten "Mode: disabled".
Updated by Ilya Dryomov about 1 year ago
- Status changed from New to Fix Under Review
- Pull request ID set to 50343
Updated by Ilya Dryomov about 1 year ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot about 1 year ago
- Copied to Backport #59061: pacific: [rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring mode added
Updated by Backport Bot about 1 year ago
- Copied to Backport #59062: quincy: [rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring mode added
Updated by Backport Bot 11 months ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".