From: Ilya Dryomov Date: Sat, 26 Nov 2022 12:27:33 +0000 (+0100) Subject: qa/workunits/rbd-nbd: clear DEV after detach tests X-Git-Tag: v17.2.6~177^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8975a2ce7240287ce29a427520c29ae696e9afbf;p=ceph.git qa/workunits/rbd-nbd: clear DEV after detach tests Otherwise we attempt to unmap it in cleanup(), needlessly. Signed-off-by: Ilya Dryomov (cherry picked from commit 4a7150cd366ed7d7581e31afbb64445a2838b7cd) --- diff --git a/qa/workunits/rbd/rbd-nbd.sh b/qa/workunits/rbd/rbd-nbd.sh index 1bac4061571c..1af9154e463b 100755 --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@ -422,6 +422,7 @@ if [ -n "${COOKIE}" ]; then test "${ANOTHER_COOKIE}" = "abc de" unmap_device ${DEV} ${PID} fi +DEV= # test detach/attach with --snap-id SNAPID=`rbd snap ls ${POOL}/${IMAGE} | awk '$2 == "snap" {print $1}'` @@ -439,5 +440,6 @@ fi get_pid ${POOL} _sudo rbd device detach ${DEV} --device-type nbd expect_false get_pid ${POOL} +DEV= echo OK