]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
workunits: make file_layout.sh more robust
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 8 Sep 2011 20:27:19 +0000 (13:27 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 8 Sep 2011 20:27:25 +0000 (13:27 -0700)
We don't have a great way to guarantee mdsmap updates, but they
should happen on their own and we can loop. Closes #1518.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
qa/workunits/kclient/file_layout.sh

index 73cb425e962f2874e5580dbcfc05165bbb5e54fd..bdba0c616826fc47fc993ed308c195908e15cc60 100755 (executable)
@@ -51,8 +51,17 @@ echo "hello, I'm a file with a custom layout" > layout_test/file2
 touch layout_test/file3
 cephfs layout_test/file3 show_layout > temp
 diff new_layout temp || return 1
+cat /sys/kernel/debug/ceph/*/mdsmap > temp
 ceph osd pool create newpool || true
 ceph mds add_data_pool 3 || true
+cat /sys/kernel/debug/ceph/*/mdsmap > temp2
+while diff -q temp2 temp
+do
+    echo "waiting for mdsmap to update"
+    sleep 1
+    cat /sys/kernel/debug/ceph/*/mdsmap > temp2
+done
+
 cephfs layout_test/file3 set_layout -p 3
 cephfs layout_test/file3 show_layout > temp
 diff file3_layout temp || return 1