From 694ed23e9d0d7637111e0afd9383d28165cfe141 Mon Sep 17 00:00:00 2001 From: Kefu Chai <kchai@redhat.com> Date: Fri, 11 Dec 2020 12:31:43 +0800 Subject: [PATCH] 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 <kchai@redhat.com> --- qa/standalone/misc/ver-health.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/qa/standalone/misc/ver-health.sh b/qa/standalone/misc/ver-health.sh index 99b2a0834e5..61c19ed5dfe 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