]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: use rbd cli for device attach/detach commands
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Tue, 25 May 2021 12:24:29 +0000 (17:54 +0530)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 23 Mar 2022 12:31:59 +0000 (13:31 +0100)
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
(cherry picked from commit e2aa4128f1e451a85200441f70a13336e843dad6)

qa/workunits/rbd/rbd-nbd.sh

index d98a63ca669356a68f0a05dff0d8562f3f586fa3..262cddb9abc4b3d5ede2e8d49505d399eefa82df 100755 (executable)
@@ -346,13 +346,14 @@ expect_false grep 'quiesce failed' ${LOG_FILE}
 DEV=`_sudo rbd device --device-type nbd --options try-netlink map ${POOL}/${IMAGE}`
 get_pid ${POOL}
 _sudo mount ${DEV} ${TEMPDIR}/mnt
-_sudo rbd-nbd detach ${POOL}/${IMAGE}
+_sudo rbd device detach ${POOL}/${IMAGE} --device-type nbd
 expect_false get_pid ${POOL}
-_sudo rbd-nbd attach --device ${DEV} ${POOL}/${IMAGE}
+expect_false _sudo rbd device attach --device ${DEV} ${POOL}/${IMAGE} --device-type nbd
+_sudo rbd device attach --device ${DEV} ${POOL}/${IMAGE} --device-type nbd --force
 get_pid ${POOL}
-_sudo rbd-nbd detach ${DEV}
+_sudo rbd device detach ${DEV} --device-type nbd
 expect_false get_pid ${POOL}
-_sudo rbd-nbd attach --device ${DEV} ${POOL}/${IMAGE}
+_sudo rbd device attach --device ${DEV} ${POOL}/${IMAGE} --device-type nbd --force
 get_pid ${POOL}
 ls ${TEMPDIR}/mnt/
 dd if=${TEMPDIR}/mnt/test of=/dev/null bs=1M count=1