From 7e48efb0615a67c08a1c90ed7996f463dc614bf3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 12 Jul 2017 08:10:47 -0400 Subject: [PATCH] qa/workunits/cephtool/test.sh: adjust full tests to avoid races OSDs may report fullness in any order. Signed-off-by: Sage Weil --- qa/workunits/cephtool/test.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index c76b100b1d158..428c404baf5c4 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:' -- 2.39.5