From: Sage Weil Date: Wed, 12 Jul 2017 12:10:47 +0000 (-0400) Subject: qa/workunits/cephtool/test.sh: adjust full tests to avoid races X-Git-Tag: v12.1.1~58^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7e48efb0615a67c08a1c90ed7996f463dc614bf3;p=ceph-ci.git qa/workunits/cephtool/test.sh: adjust full tests to avoid races OSDs may report fullness in any order. Signed-off-by: Sage Weil --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index c76b100b1d1..428c404baf5 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1790,19 +1790,27 @@ function test_mon_pg() # Check injected full results $SUDO ceph --admin-daemon $(get_admin_socket osd.0) injectfull nearfull wait_for_health "OSD_NEARFULL" + ceph health detail | grep "osd.0 is near full" + $SUDO ceph --admin-daemon $(get_admin_socket osd.0) injectfull none + wait_for_health_ok + $SUDO ceph --admin-daemon $(get_admin_socket osd.1) injectfull backfillfull wait_for_health "OSD_BACKFILLFULL" + ceph health detail | grep "osd.1 is backfill full" + $SUDO ceph --admin-daemon $(get_admin_socket osd.1) injectfull none + wait_for_health_ok + $SUDO ceph --admin-daemon $(get_admin_socket osd.2) injectfull failsafe # failsafe and full are the same as far as the monitor is concerned wait_for_health "OSD_FULL" + ceph health detail | grep "osd.2 is full" + $SUDO ceph --admin-daemon $(get_admin_socket osd.2) injectfull none + wait_for_health_ok + $SUDO ceph --admin-daemon $(get_admin_socket osd.0) injectfull full wait_for_health "OSD_FULL" ceph health detail | grep "osd.0 is full" - ceph health detail | grep "osd.2 is full" - ceph health detail | grep "osd.1 is backfill full" $SUDO ceph --admin-daemon $(get_admin_socket osd.0) injectfull none - $SUDO ceph --admin-daemon $(get_admin_socket osd.1) injectfull none - $SUDO ceph --admin-daemon $(get_admin_socket osd.2) injectfull none wait_for_health_ok ceph pg stat | grep 'pgs:'