Skip to content

Commit

Permalink
qa/standalone: Add standalone test to validate osd-mclock-skip-benchm…
Browse files Browse the repository at this point in the history
…ark option

Add a standalone test - test_activate_osd_skip_benchmark() in ceph-helpers.sh
that exercises the osd-mclock-skip-benchmark option.

Fixes: https://tracker.ceph.com/issues/52025
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
  • Loading branch information
sseshasa committed Sep 1, 2021
1 parent 7c25511 commit f539bed
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions qa/standalone/ceph-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,41 @@ function test_activate_osd_after_mark_down() {

teardown $dir || return 1
}

function test_activate_osd_skip_benchmark() {
local dir=$1

setup $dir || return 1

run_mon $dir a || return 1
run_mgr $dir x || return 1

# Skip the osd benchmark during first osd bring-up.
run_osd $dir 0 --osd-op-queue=mclock_scheduler \
--osd-mclock-skip-benchmark=true || return 1
local max_iops_hdd_def=$(CEPH_ARGS='' ceph --format=json daemon \
$(get_asok_path osd.0) config get osd_mclock_max_capacity_iops_hdd)
local max_iops_ssd_def=$(CEPH_ARGS='' ceph --format=json daemon \
$(get_asok_path osd.0) config get osd_mclock_max_capacity_iops_ssd)

kill_daemons $dir TERM osd || return 1
ceph osd down 0 || return 1
wait_for_osd down 0 || return 1

# Skip the osd benchmark during activation as well. Validate that
# the max osd capacities are left unchanged.
activate_osd $dir 0 --osd-op-queue=mclock_scheduler \
--osd-mclock-skip-benchmark=true || return 1
local max_iops_hdd_after_boot=$(CEPH_ARGS='' ceph --format=json daemon \
$(get_asok_path osd.0) config get osd_mclock_max_capacity_iops_hdd)
local max_iops_ssd_after_boot=$(CEPH_ARGS='' ceph --format=json daemon \
$(get_asok_path osd.0) config get osd_mclock_max_capacity_iops_ssd)

test "$max_iops_hdd_def" = "$max_iops_hdd_after_boot" || return 1
test "$max_iops_ssd_def" = "$max_iops_ssd_after_boot" || return 1

teardown $dir || return 1
}
#######################################################################

##
Expand Down

0 comments on commit f539bed

Please sign in to comment.