]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool/test.sh: adjust full tests to avoid races
authorSage Weil <sage@redhat.com>
Wed, 12 Jul 2017 12:10:47 +0000 (08:10 -0400)
committerSage Weil <sage@redhat.com>
Wed, 12 Jul 2017 16:52:03 +0000 (12:52 -0400)
OSDs may report fullness in any order.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool/test.sh

index c76b100b1d158e3e320ebf87fc6fffcd3db0d585..428c404baf5c49c6f0133e394fde06495919d18c 100755 (executable)
@@ -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:'