]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/ceph-helpers: test wait_for_health_ok differently 16317/head
authorKefu Chai <kchai@redhat.com>
Thu, 13 Jul 2017 09:43:39 +0000 (17:43 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 13 Jul 2017 09:49:44 +0000 (17:49 +0800)
0 OSDs is not an error anymore in the new health checking implemented by
OSDMap::check_health(). this case was treated as an error before, see
OSDMonitor::get_health(). but an osdmap without any OSD is fine, i
think. but an osdmap with 3 OSDs, but all of them are down and out, this
is an error. and we do report this as an error. so, let's update the
test instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/ceph-helpers.sh

index b42862ffeda2737f9c679bf635caf5002b619dec..f66a7ece08297ede6e1bd10c20048722ffbb78d0 100755 (executable)
@@ -1325,8 +1325,10 @@ function test_wait_for_health_ok() {
     setup $dir || return 1
     run_mon $dir a --osd_pool_default_size=1 --osd_failsafe_full_ratio=.99 --mon_pg_warn_min_per_osd=0 || return 1
     run_mgr $dir x --mon_pg_warn_min_per_osd=0 || return 1
-    ! TIMEOUT=1 wait_for_health_ok || return 1
     run_osd $dir 0 || return 1
+    kill_daemons $dir TERM osd || return 1
+    ! TIMEOUT=1 wait_for_health_ok || return 1
+    activate_osd $dir 0 || return 1
     wait_for_health_ok || return 1
     teardown $dir || return 1
 }