diff options
author | Sage Weil <sage@inktank.com> | 2013-04-19 14:08:51 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-04-19 14:37:21 -0700 |
commit | fe9d3260998e30c9237c2e2d5ba7a0ac6f336966 (patch) | |
tree | 579a04b90aac3040a53370f58d2b50adfbb8bceb /qa | |
parent | f114fdc40a0aac9f38745c50dce18d186e657acd (diff) | |
download | ceph-fe9d3260998e30c9237c2e2d5ba7a0ac6f336966.tar.gz |
rbd: fix qa tests to use --allow-shrink
Fixes: #4763
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/workunits/rbd/copy.sh | 5 | ||||
-rwxr-xr-x | qa/workunits/rbd/kernel.sh | 2 | ||||
-rwxr-xr-x | qa/workunits/rbd/permissions.sh | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/qa/workunits/rbd/copy.sh b/qa/workunits/rbd/copy.sh index a3334c073d6..8430fca7665 100755 --- a/qa/workunits/rbd/copy.sh +++ b/qa/workunits/rbd/copy.sh @@ -29,10 +29,11 @@ test_others() { # import, snapshot rbd import $RBD_CREATE_ARGS /tmp/img1 testimg1 - rbd resize testimg1 --size=256 + rbd resize testimg1 --size=256 --allow-shrink rbd export testimg1 /tmp/img2 rbd snap create testimg1 --snap=snap1 - rbd resize testimg1 --size=128 + rbd resize testimg1 --size=128 && exit 1 || true # shrink should fail + rbd resize testimg1 --size=128 --allow-shrink rbd export testimg1 /tmp/img3 # info diff --git a/qa/workunits/rbd/kernel.sh b/qa/workunits/rbd/kernel.sh index 73f3dcb6b41..3786de161ec 100755 --- a/qa/workunits/rbd/kernel.sh +++ b/qa/workunits/rbd/kernel.sh @@ -72,7 +72,7 @@ sudo dd if=/dev/rbd/rbd/testimg1@snap1 of=/tmp/img1.snap1 cmp /tmp/img1 /tmp/img1.snap1 # resize -rbd resize testimg1 --size=40 +rbd resize testimg1 --size=40 --allow-shrink echo 1 | sudo tee /sys/bus/rbd/devices/$DEV_ID1/refresh cat /sys/bus/rbd/devices/$DEV_ID1/size | grep 41943040 echo 1 | sudo tee /sys/bus/rbd/devices/$DEV_ID2/refresh diff --git a/qa/workunits/rbd/permissions.sh b/qa/workunits/rbd/permissions.sh index 74c24c03c2b..a4b0c32fdee 100755 --- a/qa/workunits/rbd/permissions.sh +++ b/qa/workunits/rbd/permissions.sh @@ -64,7 +64,7 @@ test_volumes_access() { rbd -k $KEYRING --id volumes lock list images/foo # commands that fail with read-only access - ! rbd -k $KEYRING --id volumes resize -s 2 images/foo + ! rbd -k $KEYRING --id volumes resize -s 2 images/foo --allow-shrink ! rbd -k $KEYRING --id volumes snap create images/foo@2 ! rbd -k $KEYRING --id volumes snap rollback images/foo@snap ! rbd -k $KEYRING --id volumes snap remove images/foo@snap |