From e2aa4128f1e451a85200441f70a13336e843dad6 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Tue, 25 May 2021 17:54:29 +0530 Subject: [PATCH] qa/workunits/rbd: use rbd cli for device attach/detach commands Signed-off-by: Prasanna Kumar Kalever --- qa/workunits/rbd/rbd-nbd.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qa/workunits/rbd/rbd-nbd.sh b/qa/workunits/rbd/rbd-nbd.sh index d98a63ca66935..262cddb9abc4b 100755 --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@ -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 -- 2.39.5