Project

General

Profile

Actions

Bug #58895

closed

[rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring mode

Added by Prasanna Kumar Kalever about 1 year ago. Updated 11 months ago.

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

0%

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

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

Additional info:
It can be observed that image mode is enabled on the pool
  1. 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
  1. rbd create mi_pool/abc --size 1M
    [ceph: root@pluto006 /]# rbd mirror image enable mi_pool/abc snapshot
    Mirroring enabled

Related issues 2 (0 open2 closed)

Copied to rbd - Backport #59061: pacific: [rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring modeResolvedPrasanna Kumar KaleverActions
Copied to rbd - Backport #59062: quincy: [rbd-mirror] Enabling mirroring on image in a namespace falsely fails saying cannot enable mirroring in current pool mirroring modeResolvedPrasanna Kumar KaleverActions
Actions #1

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
  1. 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

... 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".

Actions #2

Updated by Ilya Dryomov about 1 year ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 50343
Actions #3

Updated by Ilya Dryomov about 1 year ago

  • Backport set to pacific,quincy
Actions #4

Updated by Ilya Dryomov about 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

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
Actions #6

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
Actions #7

Updated by Backport Bot about 1 year ago

  • Tags set to backport_processed
Actions #8

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".

Actions

Also available in: Atom PDF