]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: rbd map-snapshot-io: udevadm settle
authorSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 04:32:41 +0000 (20:32 -0800)
committerSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 04:32:41 +0000 (20:32 -0800)
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>
qa/workunits/rbd/map-snapshot-io.sh

index 1fb26523e92184044e5fd6c7f601cf7d5dc484ea..b53a81387d4fc9932c37e751f434c9e2a92c1c09 100755 (executable)
@@ -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