]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/standalone/mon/health-mute.sh: fix up rachet test
authorSage Weil <sage@redhat.com>
Mon, 19 Aug 2019 17:28:31 +0000 (12:28 -0500)
committerSage Weil <sage@redhat.com>
Mon, 19 Aug 2019 17:30:10 +0000 (12:30 -0500)
Make sure we provide time for the mute to get cleared out by tick().

Signed-off-by: Sage Weil <sage@redhat.com>
qa/standalone/mon/health-mute.sh

index 4e1b10be340b31fd48a3071f29b7a531d7a026b9..226d6ab31fa096d01e697703034bc9ba0d2dbe86 100755 (executable)
@@ -75,20 +75,33 @@ function TEST_mute() {
     ceph osd down 0 1
     ceph -s
     ceph health detail | grep OSD_DOWN || return 1
+
     ceph health mute OSD_DOWN
     kill_daemons $dir TERM osd.0
     ceph osd unset noup
+    sleep 10
     ceph -s
     ceph health detail | grep OSD_DOWN || return 1
+    ceph health detail | grep '1 osds down' || return 1
     ceph health | grep HEALTH_OK || return 1
-    sleep 10
+
+    sleep 10 # give time for mon tick to rachet the mute
     ceph osd set noup
     ceph health mute OSDMAP_FLAGS
     ceph -s
+    ceph health detail
     ceph health | grep HEALTH_OK || return 1
+
     ceph osd down 1
     ceph -s
+    ceph health detail
+    ceph health detail | grep '2 osds down' || return 1
+
+    sleep 10 # give time for mute to clear
+    ceph -s
+    ceph health detail
     ceph health | grep HEALTH_WARN || return 1
+    ceph health detail | grep '2 osds down' || return 1
 
     teardown $dir || return 1
 }