]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool/test.sh: look for 'ceph log' via -w, not in log file
authorSage Weil <sage@inktank.com>
Wed, 12 Jun 2013 21:00:24 +0000 (14:00 -0700)
committerSage Weil <sage@inktank.com>
Wed, 12 Jun 2013 21:00:24 +0000 (14:00 -0700)
'ceph-conf ...' doesn't give you final/default values, only what is in the
conf file.  Use -w output to test this instead.

Fixes: #5327
Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/cephtool/test.sh

index 63dd68b6da58ad1fb7e2b05d3d38820adf892635..955a74bac5831237981f6ec6ef0ec648feb1408c 100755 (executable)
@@ -69,10 +69,19 @@ ceph health detail --format xml-pretty
 ceph injectargs -- --debug_ms=1
 ceph injectargs -- --debug-ms=1
 expect_false ceph injectargs -- debug_ms=1
+
+ceph -w > /tmp/$$ &
+wpid="$!"
 mymsg="this is a test log message $$.$(date)"
 ceph log "$mymsg"
-logfile=$(ceph-conf --name=mon.a --lookup log_file)
-grep "$mymsg" $logfile
+sleep 3
+if ! grep "$mymsg" /tmp/$$; then
+    # in case it is very slow (mon thrashing or something)
+    sleep 30
+    grep "$mymsg" /tmp/$$
+fi
+kill $wpid
+
 ceph mds cluster_down 2>&1 | grep "marked mdsmap DOWN"
 expect_false ceph mds cluster_down
 ceph mds cluster_up 2>&1 | grep "unmarked mdsmap DOWN"