Bug 2017621

Summary: rbd: promote rbd-nbd attach and detach at rbd integrated CLI
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Prasanna Kumar Kalever <prasanna.kalever>
Component: RBDAssignee: Ilya Dryomov <idryomov>
Status: CLOSED ERRATA QA Contact: Preethi <pnataraj>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.1CC: ceph-eng-bugs, ceph-qe-bugs, gpatta, tserlin
Target Milestone: ---   
Target Release: 5.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.2.7-48.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-04 10:22:22 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: 1851289    

Description Prasanna Kumar Kalever 2021-10-27 03:15:49 UTC
Description of problem:

Only rbd-nbd CLI supports attach and detach operations, this should be exported at rbd integrated CLI

Example:
$ rbd device attach rbd-pool/image --device /dev/nbd0 --device-type nbd --force
$ rbd device detach rpool/image --device-type nbd



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


How reproducible:
100%


Additional info:
Fix: https://github.com/ceph/ceph/pull/41279

Comment 1 RHEL Program Management 2021-10-27 03:15:55 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 9 Gopi 2022-02-16 13:26:48 UTC
Working as expected. Moving this bug to verified state.

[root@ceph-gpatta-eifeaq-node1-installer cephuser]# rbd device map -t nbd --options try-netlink rbd-nbd-pool/rbd-nbd-image
/dev/nbd0
[root@ceph-gpatta-eifeaq-node1-installer cephuser]# rbd device detach -t nbd  rbd-nbd-pool/rbd-nbd-image
[root@ceph-gpatta-eifeaq-node1-installer cephuser]# rbd device attach rbd-nbd-pool/rbd-nbd-image -t nbd --device /dev/nbd0 --force
/dev/nbd0
[root@ceph-gpatta-eifeaq-node1-installer cephuser]# rbd device detach rbd-nbd-pool/rbd-nbd-image --device-type nbd
[root@ceph-gpatta-eifeaq-node1-installer cephuser]# rbd device unmap -t nbd rbd-nbd-pool/rbd-nbd-image
rbd-nbd: rbd-nbd-pool/rbd-nbd-image is not mapped
rbd: rbd-nbd failed with error: /usr/bin/rbd-nbd: exit status: 1

Comment 11 errata-xmlrpc 2022-04-04 10:22:22 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 5.1 Security, Enhancement, 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-2022:1174