Bug 2357422 - Adding/removing/listing mirror group snapshot schedule should be blocked when group mirroring is disabled
Summary: Adding/removing/listing mirror group snapshot schedule should be blocked when...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RBD-Mirror
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 8.1
Assignee: Ram Raja
QA Contact: aarsharm
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-04 04:46 UTC by aarsharm
Modified: 2025-06-26 12:22 UTC (History)
4 users (show)

Fixed In Version: ceph-19.2.1-146.el9cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2025-06-26 12:22:34 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-11060 0 None None None 2025-04-04 04:49:26 UTC
Red Hat Product Errata RHSA-2025:9775 0 None None None 2025-06-26 12:22:38 UTC

Description aarsharm 2025-04-04 04:46:59 UTC
Description of problem:
To keep Behavior consistent with Image mirror scheduler, the suggestion is to block adding/removing/listing group mirror snapshot schedule when mirror group is disabled.

Image mirror Scheduler Behavior is as below:

#Enable mirroring on image
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]#  rbd mirror image enable pool_1/image3 snapshot
Mirroring enabled

#Able to add snapshot schedule when mirroring is enabled
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror snapshot schedule add --pool pool_1 --image image3 3m

# Schedule added
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror snapshot schedule ls --pool pool_1 --image image3
every 3m

#Disable Mirroring on image
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror image disable pool_1/image3
Mirroring disabled

#Not able to add snapshot schedule in mirror disabled mode
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror snapshot schedule add --pool pool_1 --image image3 4m
rbd: rbd mirror snapshot schedule add failed: (22) Invalid argument: image image3 is not in snapshot mirror mode
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror snapshot schedule ls --pool pool_1 --image image3
rbd: rbd mirror snapshot schedule list failed: (22) Invalid argument: image image3 is not in snapshot mirror mode
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# rbd mirror snapshot schedule remove --pool pool_1 --image image3 3m
rbd: rbd mirror snapshot schedule remove failed: (22) Invalid argument: image image3 is not in snapshot mirror mode
[ceph: root@ceph-rbd1-cg-ds-tf74dn-node1-installer /]# 


Group Mirror snapshot scheduler is as below:
 
-Group mirroring is enabled
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd group info --group group_1 --pool pool_1
rbd group 'group_1':
    	id: 39c91235779e
    	mirroring state: enabled
    	mirroring mode: snapshot
    	mirroring global id: 4d885e39-f336-43f6-9e74-3c772927d6c5
    	mirroring primary: true

-Disable group mirroring
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group disable --group group_1 --pool pool_1
Mirroring disabled

-Add mirror group snapshot schedule
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule add --pool pool_1 --group group_1 2m
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule list --pool pool_1 --group group_1
every 2m

Note: Should be blocked adding/removing mirror group snapshot schedule when group mirroring is disabled?

-Check snapshot schedule list

[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule list --pool pool_1 --group group_1
every 2m
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule status --pool pool_1 --group group_1
SCHEDULE TIME  GROUP

Note: Although we are able to add, but its not getting applied to the group, which is expected.


-Remove mirror group snapshot

[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule remove --pool pool_1 --group group_1
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule list --pool pool_1 --group group_1
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]# rbd mirror group snapshot schedule status --pool pool_1 --group group_1
SCHEDULE TIME  GROUP
[ceph: root@ceph-rbd1-upstream-cg1-ee13a0-node1-installer /]#

>> I understand that the schedule is not getting applied to the group, but this bz is to keep consistent with image mirror snapshot scheduler and block add/remove/list operation in group mirror snapshot scheduler also.


Version-Release number of selected component (if applicable):
19.2.1-57.el9cp

Steps to Reproduce: as provided above

Actual results: Able to add/remove/list mirror group snapshot schedule once mirroring is disabled on the group

Expected results: Should not be able to add/remove/list mirror group snapshot schedule once mirroring is disabled on the group

Additional info: NA

Comment 5 errata-xmlrpc 2025-06-26 12:22:34 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 (Important: Red Hat Ceph Storage 8.1 security, bug fix, and enhancement updates), 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-2025:9775


Note You need to log in before you can comment on or make changes to this bug.