diff options
author | Sage Weil <sage@inktank.com> | 2013-02-18 20:32:41 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-18 20:32:41 -0800 |
commit | 45a4fe09151bcdeaaa2c3b5dbd089a91deaa055f (patch) | |
tree | cf4d50c1b627f3bbaabf67aea09632c56142eae5 | |
parent | 3f5c25279622ea59624ae689cd21e9d69c852c0c (diff) | |
download | ceph-45a4fe09151bcdeaaa2c3b5dbd089a91deaa055f.tar.gz |
qa: rbd map-snapshot-io: udevadm settle
Udev runs blkid on device close, thwarting any rbd unmap that
immediately follows use of the device. Explicitly settle for now.
See #4183.
Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | qa/workunits/rbd/map-snapshot-io.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qa/workunits/rbd/map-snapshot-io.sh b/qa/workunits/rbd/map-snapshot-io.sh index 1fb26523e92..b53a81387d4 100755 --- a/qa/workunits/rbd/map-snapshot-io.sh +++ b/qa/workunits/rbd/map-snapshot-io.sh @@ -15,7 +15,14 @@ rbd snap create image@s1 dd if=/dev/zero of=/dev/rbd/rbd/image oflag=direct count=10 # used to fail rbd snap rm image@s1 dd if=/dev/zero of=/dev/rbd/rbd/image oflag=direct count=10 + +udevadm settle # udev is does blkid on device close; yeesh! see #4183 + rbd unmap /dev/rbd/rbd/image +# wait a few seconds for the async kernel bits to clean themselves up +sleep 4 +rbd rm image || : + echo OK |