]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/standalone/misc/ver-health.sh: include the bootup-time 38522/head
authorKefu Chai <kchai@redhat.com>
Fri, 11 Dec 2020 04:31:43 +0000 (12:31 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 11 Dec 2020 08:14:03 +0000 (16:14 +0800)
in my test bed, it takes 11 seconds to boot the 3 OSDs and to restart
one of them, this fails the test.

so we need to take the time into consideration. in this change, the
delay is added to the total "warn_older_version_delay", so the monitor
does not start sending warning earlier than expected.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/standalone/misc/ver-health.sh

index 99b2a0834e5c51433caf5045de590fe90558d586..61c19ed5dfe7ba5bfa2390c1af75b3eaf1c3f501 100755 (executable)
@@ -175,19 +175,26 @@ function TEST_check_version_health_3() {
     setup $dir || return 1
 
     # create a cluster with two monitors and three osds
-    run_mon $dir a --public-addr=$CEPH_MON_A --mon_warn_older_version_delay=20.0 || return 1
-    run_mon $dir b --public-addr=$CEPH_MON_B --mon_warn_older_version_delay=20.0 || return 1
-    run_osd $dir 0 || return 1
-    run_osd $dir 1 || return 1
-    run_osd $dir 2 || return 1
+    run_mon $dir a --public-addr=$CEPH_MON_A || return 1
+    run_mon $dir b --public-addr=$CEPH_MON_B || return 1
+
+    local start_osd_time=$SECONDS
+    # use memstore for faster bootup
+    EXTRA_OPTS=" --osd-objectstore=memstore" run_osd $dir 0 || return 1
+    EXTRA_OPTS=" --osd-objectstore=memstore" run_osd $dir 1 || return 1
+    EXTRA_OPTS=" --osd-objectstore=memstore" run_osd $dir 2 || return 1
+    # take the time used for boot osds into consideration
+    local warn_older_version_delay=$(($SECONDS - $start_osd_time + 20))
 
     sleep 5
     ceph health detail
     # should not see this yet
     ceph health detail | grep DAEMON_OLD_VERSION && return 1
-
+    ceph tell 'mon.*' injectargs "--mon_warn_older_version_delay $warn_older_version_delay"
     kill_daemons $dir KILL osd.1
-    ceph_debug_version_for_testing=01.00.00-gversion-test activate_osd $dir 1
+    EXTRA_OPTS=" --osd-objectstore=memstore" \
+          ceph_debug_version_for_testing=01.00.00-gversion-test \
+          activate_osd $dir 1
 
     # Wait 50% of 20 second delay config
     sleep 10