X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fqa%2Fworkunits%2Frbd%2Ftest_lock_fence.sh;fp=src%2Fceph%2Fqa%2Fworkunits%2Frbd%2Ftest_lock_fence.sh;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=7ecafd46356865313ae4369a41e3e7e893829f97;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/qa/workunits/rbd/test_lock_fence.sh b/src/ceph/qa/workunits/rbd/test_lock_fence.sh deleted file mode 100755 index 7ecafd4..0000000 --- a/src/ceph/qa/workunits/rbd/test_lock_fence.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -x -# can't use -e because of background process - -IMAGE=rbdrw-image -LOCKID=rbdrw -RELPATH=$(dirname $0)/../../../src/test/librbd -RBDRW=$RELPATH/rbdrw.py - -rbd create $IMAGE --size 10 --image-format 2 --image-shared || exit 1 - -# rbdrw loops doing I/O to $IMAGE after locking with lockid $LOCKID -python $RBDRW $IMAGE $LOCKID & -iochild=$! - -# give client time to lock and start reading/writing -LOCKS='{}' -while [ "$LOCKS" == "{}" ] -do - LOCKS=$(rbd lock list $IMAGE --format json) - sleep 1 -done - -clientaddr=$(rbd lock list $IMAGE | tail -1 | awk '{print $NF;}') -clientid=$(rbd lock list $IMAGE | tail -1 | awk '{print $1;}') -echo "clientaddr: $clientaddr" -echo "clientid: $clientid" - -ceph osd blacklist add $clientaddr || exit 1 - -wait $iochild -rbdrw_exitcode=$? -if [ $rbdrw_exitcode != 108 ] -then - echo "wrong exitcode from rbdrw: $rbdrw_exitcode" - exit 1 -else - echo "rbdrw stopped with ESHUTDOWN" -fi - -set -e -ceph osd blacklist rm $clientaddr -rbd lock remove $IMAGE $LOCKID "$clientid" -# rbdrw will have exited with an existing watch, so, until #3527 is fixed, -# hang out until the watch expires -sleep 30 -rbd rm $IMAGE -echo OK