Bug 2024444

Summary: [rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring mode
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: RBD-MirrorAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED ERRATA QA Contact: Rajendra Khambadkar <rkhambad>
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 5.1CC: akraj, ceph-eng-bugs, idryomov, kdreyer, prasanna.kalever, rkhambad
Target Milestone: ---Flags: prasanna.kalever: needinfo-
Target Release: 6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-17.2.6-11.el9cp Doc Type: Bug Fix
Doc Text:
.Error message when enabling image mirroring within a namespace now provides more insight Previously, attempting to enable image mirroring within a namespace would fail with a "cannot enable mirroring in current pool mirroring mode" error. The error would neither provide insight into the problem nor provide any solution. With this fix, to provide more insight, the error handling is improved and the error now states "cannot enable mirroring: mirroring is not enabled on a namespace".
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-15 09:15:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2192813    

Description Vasishta 2021-11-18 06:27:23 UTC
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


Version-Release number of selected component (if applicable):
16.2.6-26

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 

Additional info:
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

It can be done for an image outside the namespace
# rbd create mi_pool/abc --size 1M
[ceph: root@pluto006 /]# rbd mirror image enable mi_pool/abc snapshot
Mirroring enabled

Comment 15 errata-xmlrpc 2023-06-15 09:15:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 6.1 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:3623