function run() {
local dir=$1
shift
- local SLEEP=0
local CHUNK_MAX=5
export CEPH_MON="127.0.0.1:7184" # git grep '\<7184\>' : there must be only one
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-host=$CEPH_MON "
CEPH_ARGS+="--osd_max_scrubs=$MAX_SCRUBS "
- CEPH_ARGS+="--osd_scrub_sleep=$SLEEP "
CEPH_ARGS+="--osd_scrub_chunk_max=$CHUNK_MAX "
CEPH_ARGS+="--osd_scrub_sleep=$SCRUB_SLEEP "
CEPH_ARGS+="--osd_pool_default_size=$POOL_SIZE "
+ # Set scheduler to "wpq" until there's a reliable way to query scrub states
+ # with "--osd-scrub-sleep" set to 0. The "mclock_scheduler" overrides the
+ # scrub sleep to 0 and as a result the checks in the test fail.
+ CEPH_ARGS+="--osd_op_queue=wpq "
export -n CEPH_CLI_TEST_DUP_COMMAND
local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
ceph pg dump pgs
max=$(CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_scrub_reservations | jq '.osd_max_scrubs')
- if [ $max != $MAX_SCRUBS];
- then
- echo "ERROR: Incorrect osd_max_scrubs from dump_scrub_reservations"
- return 1
+ if [ $max != $MAX_SCRUBS ]; then
+ echo "ERROR: Incorrect osd_max_scrubs from dump_scrub_reservations"
+ return 1
fi
ceph osd unset noscrub
# Launch a cluster with 3 seconds scrub interval
run_mon $dir a || return 1
run_mgr $dir x || return 1
+ # Set scheduler to "wpq" until there's a reliable way to query scrub states
+ # with "--osd-scrub-sleep" set to 0. The "mclock_scheduler" overrides the
+ # scrub sleep to 0 and as a result the checks in the test fail.
local ceph_osd_args="--osd-scrub-auto-repair=true \
--osd_deep_scrub_randomize_ratio=0 \
- --osd-scrub-interval-randomize-ratio=0"
+ --osd-scrub-interval-randomize-ratio=0 \
+ --osd-op-queue=wpq"
for id in $(seq 0 2) ; do
run_osd $dir $id $ceph_osd_args || return 1
done
run_mgr $dir x || return 1
for osd in $(seq 0 $(expr $OSDS - 1))
do
- run_osd $dir $osd --osd_pool_default_pg_autoscale_mode=off \
- --osd_deep_scrub_randomize_ratio=0.0 \
- --osd_scrub_sleep=5.0 \
- --osd_scrub_interval_randomize_ratio=0 || return 1
+ # Set scheduler to "wpq" until there's a reliable way to query scrub
+ # states with "--osd-scrub-sleep" set to 0. The "mclock_scheduler"
+ # overrides the scrub sleep to 0 and as a result the checks in the
+ # test fail.
+ run_osd $dir $osd --osd_pool_default_pg_autoscale_mode=off \
+ --osd_deep_scrub_randomize_ratio=0.0 \
+ --osd_scrub_sleep=5.0 \
+ --osd_scrub_interval_randomize_ratio=0 \
+ --osd_op_queue=wpq || return 1
done
# Create a pool with a single pg