mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
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>
This commit is contained in:
parent
5a0c2dbe2a
commit
694ed23e9d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user