From: Kefu Chai Date: Fri, 11 Dec 2020 04:31:43 +0000 (+0800) Subject: qa/standalone/misc/ver-health.sh: include the bootup-time X-Git-Tag: v16.1.0~203^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38522%2Fhead;p=ceph.git qa/standalone/misc/ver-health.sh: include the bootup-time 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 --- diff --git a/qa/standalone/misc/ver-health.sh b/qa/standalone/misc/ver-health.sh index 99b2a0834e5c..61c19ed5dfe7 100755 --- a/qa/standalone/misc/ver-health.sh +++ b/qa/standalone/misc/ver-health.sh @@ -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