Bug 2330769

Summary: [RBD] CLI - RBD group image add failing with optional arguments
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Chaitanya <cdommeti>
Component: RBDAssignee: Ilya Dryomov <idryomov>
Status: CLOSED ERRATA QA Contact: Chaitanya <cdommeti>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: ceph-eng-bugs, cephqe-warriors, idryomov, sangadi, tserlin
Target Milestone: ---   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.1-2.el9cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-26 12:19:51 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:

Description Chaitanya 2024-12-06 11:39:44 UTC
Description of problem:

'RBD group image add' failing with optional arguments when a namespace image is used.

[root@ceph-cdpool-1qyaxy-node4 ~]# rbd group image add --group-pool rep_pool_FuwYm0 --group-namespace ns_NkKwf --group image_group --image-pool rep_pool_FuwYm0 --image-namespace ns_NkKwf --image test_image1_wnHxL

rbd: add image error: (2) No such file or directory
2024-12-06T06:09:54.093+0000 7f9417314140 -1 librbd::api::Group: image_add: error reading group id object: (2) No such file or directory


However, 'RBD group image add' is successful with positional arguments.

[root@ceph-cdpool-1qyaxy-node4 ~]# rbd group image add rep_pool_FuwYm0/ns_NkKwf/image_group rep_pool_FuwYm0/ns_NkKwf/test_image1_wnHxL

[root@ceph-cdpool-1qyaxy-node4 ~]# rbd group image ls rep_pool_FuwYm0/ns_NkKwf/image_group
rep_pool_FuwYm0/ns_NkKwf/test_image1_wnHxL


How reproducible:
Always


Steps to Reproduce:

1. Create namespace 
rbd namespace create  --namespace ns_dGkiU --pool rep_pool_BRRnu0

2. Create namspace image
rbd create rep_pool_BRRnu0/ns_dGkiU/test_image1_icLbm --size 5G

3. create group
rbd group create   --pool rep_pool_BRRnu0 --namespace ns_dGkiU --group image_group

4. Add image to the group

root@ceph-cdpool-1qyaxy-node4 ~]# rbd group image add --group-pool rep_pool_BRRnu0 --group-namespace ns_dGkiU  --group image_group --image-pool rep_pool_BRRnu0 --image-namespace ns_dGkiU --image test_image1_icLbm


Actual results:

rbd: add image error: (2) No such file or directory
2024-12-06T11:36:06.221+0000 7f9f8240e140 -1 librbd::api::Group: image_add: error reading group id object: (2) No such file or directory


Expected results:
Image should have been added to the group and 

'rbd group image ls rep_pool_BRRnu0/ns_dGkiU/image_group' should have listed the image

Comment 7 errata-xmlrpc 2025-06-26 12:19:51 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