From 72091a80b50317c61750f926dfd0dfbd8a37441a Mon Sep 17 00:00:00 2001 From: Sridhar Seshasayee Date: Fri, 25 Mar 2022 22:10:31 +0530 Subject: [PATCH] qa/standalone: Fix test_activate_osd() test in ceph-helpers.sh Modify test_activate_osd() to get the type of scheduler in use and then verify the value of osd_max_backfills. This is because mclock scheduler overrides this option to 1000 upon OSD initialization. The test earlier used to pass because the OSD daemon was killed but not marked down and upon being brought up, the wait for OSD up check was passing quickly. But the OSD still didn't have the latest config values. But now upon killing the OSD, the osd_fast_shutdown sequence notifies the mon (see PR: https://github.com/ceph/ceph/pull/44807) and is marked down and dead. Upon bringing it up, the wait for OSD up check takes a longer time and this is sufficient for the config values to be updated. This results in the correct values being read from the config 'Values' map. Signed-off-by: Sridhar Seshasayee (cherry picked from commit 3aa2df2e0f6f5bafadc96fd72935e5cf8b2fcf17) --- qa/standalone/ceph-helpers.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index d945ccf0707ee..58786e8c1a59d 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -896,9 +896,14 @@ function test_activate_osd() { kill_daemons $dir TERM osd || return 1 activate_osd $dir 0 --osd-max-backfills 20 || return 1 + local scheduler=$(get_op_scheduler 0) local backfills=$(CEPH_ARGS='' ceph --format=json daemon $(get_asok_path osd.0) \ config get osd_max_backfills) - test "$backfills" = '{"osd_max_backfills":"20"}' || return 1 + if [ "$scheduler" = "mclock_scheduler" ]; then + test "$backfills" = '{"osd_max_backfills":"1000"}' || return 1 + else + test "$backfills" = '{"osd_max_backfills":"20"}' || return 1 + fi teardown $dir || return 1 } -- 2.39.5