@@ -603,17 +603,16 @@ function TEST_dump_scrub_schedule() {
603603 declare -A expct_dmp_duration=( [' dmp_last_duration' ]=" 0" [' dmp_last_duration_neg' ]=" not0" )
604604 wait_any_cond $pgid 10 $saved_last_stamp expct_dmp_duration " WaitingAfterScrub_dmp " sched_data || return 1
605605
606- sleep 2
607-
608606 #
609607 # step 2: set noscrub and request a "periodic scrub". Watch for the change in the 'is the scrub
610608 # scheduled for the future' value
611609 #
612610
613- ceph tell osd.* config set osd_shallow_scrub_chunk_max " 3" || return 1
614- ceph tell osd.* config set osd_scrub_sleep " 2.0" || return 1
615611 ceph osd set noscrub || return 1
616612 sleep 2
613+ ceph tell osd.* config set osd_shallow_scrub_chunk_max " 3" || return 1
614+ ceph tell osd.* config set osd_scrub_sleep " 2.0" || return 1
615+ sleep 8
617616 saved_last_stamp=${sched_data['query_last_stamp']}
618617
619618 ceph tell $pgid schedule-scrub
@@ -692,28 +691,28 @@ function wait_initial_scrubs() {
692691
693692 # set a long schedule for the periodic scrubs. Wait for the
694693 # initial 'no previous scrub is known' scrubs to finish for all PGs.
695- bin/ ceph tell osd.* config set osd_scrub_min_interval 7200
696- bin/ ceph tell osd.* config set osd_deep_scrub_interval 14400
697- bin/ ceph tell osd.* config set osd_max_scrubs 32
698- bin/ ceph tell osd.* config set osd_scrub_sleep 0
699- bin/ ceph tell osd.* config set osd_shallow_scrub_chunk_max 10
700- bin/ ceph tell osd.* config set osd_scrub_chunk_max 10
694+ ceph tell osd.* config set osd_scrub_min_interval 7200
695+ ceph tell osd.* config set osd_deep_scrub_interval 14400
696+ ceph tell osd.* config set osd_max_scrubs 32
697+ ceph tell osd.* config set osd_scrub_sleep 0
698+ ceph tell osd.* config set osd_shallow_scrub_chunk_max 10
699+ ceph tell osd.* config set osd_scrub_chunk_max 10
701700
702701 for pg in " ${! pg_to_prim_dict[@]} " ; do
703702 (( extr_dbg >= 1 )) && echo " Scheduling initial scrub for $pg "
704- bin/ ceph tell $pg scrub || return 1
703+ ceph tell $pg scrub || return 1
705704 done
706705
707706 sleep 1
708- (( extr_dbg >= 1 )) && bin/ ceph pg dump pgs --format=json-pretty | \
707+ (( extr_dbg >= 1 )) && ceph pg dump pgs --format=json-pretty | \
709708 jq ' .pg_stats | map(select(.last_scrub_duration == 0)) | map({pgid: .pgid, last_scrub_duration: .last_scrub_duration})'
710709
711710 tout=20
712711 while [ $tout -gt 0 ] ; do
713712 sleep 0.5
714- (( extr_dbg >= 2 )) && bin/ ceph pg dump pgs --format=json-pretty | \
713+ (( extr_dbg >= 2 )) && ceph pg dump pgs --format=json-pretty | \
715714 jq ' .pg_stats | map(select(.last_scrub_duration == 0)) | map({pgid: .pgid, last_scrub_duration: .last_scrub_duration})'
716- not_done=$( bin/ ceph pg dump pgs --format=json-pretty | \
715+ not_done=$( ceph pg dump pgs --format=json-pretty | \
717716 jq ' .pg_stats | map(select(.last_scrub_duration == 0)) | map({pgid: .pgid, last_scrub_duration: .last_scrub_duration})' | wc -l )
718717 # note that we should ignore a header line
719718 if [ " $not_done " -le 1 ]; then
@@ -782,14 +781,14 @@ function TEST_abort_periodic_for_operator() {
782781 wait_initial_scrubs pg_pr || return 1
783782
784783 # limit all OSDs to one scrub at a time
785- bin/ ceph tell osd.* config set osd_max_scrubs 1
786- bin/ ceph tell osd.* config set osd_stats_update_period_not_scrubbing 1
784+ ceph tell osd.* config set osd_max_scrubs 1
785+ ceph tell osd.* config set osd_stats_update_period_not_scrubbing 1
787786
788787 # configure for slow scrubs
789- bin/ ceph tell osd.* config set osd_scrub_sleep 3
790- bin/ ceph tell osd.* config set osd_shallow_scrub_chunk_max 2
791- bin/ ceph tell osd.* config set osd_scrub_chunk_max 2
792- (( extr_dbg >= 2 )) && bin/ ceph tell osd.2 dump_scrub_reservations --format=json-pretty
788+ ceph tell osd.* config set osd_scrub_sleep 3
789+ ceph tell osd.* config set osd_shallow_scrub_chunk_max 2
790+ ceph tell osd.* config set osd_scrub_chunk_max 2
791+ (( extr_dbg >= 2 )) && ceph tell osd.2 dump_scrub_reservations --format=json-pretty
793792
794793 # the first PG to work with:
795794 local pg1=" 1.0"
@@ -812,7 +811,7 @@ function TEST_abort_periodic_for_operator() {
812811 fi
813812
814813 # the common primary is allowed two concurrent scrubs
815- bin/ ceph tell osd." ${pg_pr[$pg1]} " config set osd_max_scrubs 2
814+ ceph tell osd." ${pg_pr[$pg1]} " config set osd_max_scrubs 2
816815 echo " The two PGs to manipulate are $pg1 and $pg2 "
817816
818817 set_query_debug " $pg1 "
@@ -821,31 +820,31 @@ function TEST_abort_periodic_for_operator() {
821820 local is_act
822821 for i in $( seq 1 3 )
823822 do
824- is_act=$( bin/ ceph pg " $pg1 " query | jq ' .scrubber.active' )
823+ is_act=$( ceph pg " $pg1 " query | jq ' .scrubber.active' )
825824 if [[ " $is_act " = " false" ]]; then
826825 break
827826 fi
828827 echo " Still waiting for pg $pg1 to finish scrubbing"
829828 sleep 0.7
830829 done
831- bin/ ceph pg dump pgs
830+ ceph pg dump pgs
832831 if [[ " $is_act " != " false" ]]; then
833- bin/ ceph pg " $pg1 " query
832+ ceph pg " $pg1 " query
834833 echo " PG $pg1 appears to be still scrubbing"
835834 return 1
836835 fi
837836 sleep 0.5
838837
839838 echo " Initiating a periodic scrub of $pg1 "
840- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
841- bin/ ceph tell $pg1 schedule-deep-scrub || return 1
839+ (( extr_dbg >= 2 )) && ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
840+ ceph tell $pg1 schedule-deep-scrub || return 1
842841 sleep 1
843- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
842+ (( extr_dbg >= 2 )) && ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
844843
845844 for i in $( seq 1 14 )
846845 do
847846 sleep 0.5
848- stt=$( bin/ ceph pg " $pg1 " query | jq ' .scrubber' )
847+ stt=$( ceph pg " $pg1 " query | jq ' .scrubber' )
849848 is_active=$( echo $stt | jq ' .active' )
850849 is_reserving_replicas=$( echo $stt | jq ' .is_reserving_replicas' )
851850 if [[ " $is_active " = " true" && " $is_reserving_replicas " = " false" ]]; then
@@ -854,49 +853,49 @@ function TEST_abort_periodic_for_operator() {
854853 echo " Still waiting for pg $pg1 to start scrubbing: $stt "
855854 done
856855 if [[ " $is_active " != " true" || " $is_reserving_replicas " != " false" ]]; then
857- bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
856+ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
858857 echo " The scrub is not active or is reserving replicas"
859858 return 1
860859 fi
861- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
860+ (( extr_dbg >= 2 )) && ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
862861
863862
864863 # PG 1 is scrubbing, and has reserved the replicas - soem of which are shared
865864 # by PG 2. As the max-scrubs was set to 1, that should prevent PG 2 from
866865 # reserving its replicas.
867866
868- (( extr_dbg >= 1 )) && bin/ ceph tell osd.* dump_scrub_reservations --format=json-pretty
867+ (( extr_dbg >= 1 )) && ceph tell osd.* dump_scrub_reservations --format=json-pretty
869868
870869 # now - the 2'nd scrub - which should be blocked on reserving
871870 set_query_debug " $pg2 "
872- bin/ ceph tell " $pg2 " schedule-deep-scrub
871+ ceph tell " $pg2 " schedule-deep-scrub
873872 sleep 0.5
874873 (( extr_dbg >= 2 )) && echo " ===================================================================================="
875- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg2 " query -f json-pretty | jq ' .scrubber'
876- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
874+ (( extr_dbg >= 2 )) && ceph pg " $pg2 " query -f json-pretty | jq ' .scrubber'
875+ (( extr_dbg >= 2 )) && ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
877876 sleep 1
878877 (( extr_dbg >= 2 )) && echo " ===================================================================================="
879- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg2 " query -f json-pretty | jq ' .scrubber'
880- (( extr_dbg >= 2 )) && bin/ ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
878+ (( extr_dbg >= 2 )) && ceph pg " $pg2 " query -f json-pretty | jq ' .scrubber'
879+ (( extr_dbg >= 2 )) && ceph pg " $pg1 " query -f json-pretty | jq ' .scrubber'
881880
882881 # make sure pg2 scrub is stuck in the reserving state
883- local stt2=$( bin/ ceph pg " $pg2 " query | jq ' .scrubber' )
882+ local stt2=$( ceph pg " $pg2 " query | jq ' .scrubber' )
884883 local pg2_is_reserving
885884 pg2_is_reserving=$( echo $stt2 | jq ' .is_reserving_replicas' )
886885 if [[ " $pg2_is_reserving " != " true" ]]; then
887886 echo " The scheduled scrub for $pg2 should have been stuck"
888- bin/ ceph pg dump pgs
887+ ceph pg dump pgs
889888 return 1
890889 fi
891890
892891 # now - issue an operator-initiated scrub on pg2.
893892 # The periodic scrub should be aborted, and the operator-initiated scrub should start.
894893 echo " Instructing $pg2 to perform a high-priority scrub"
895- bin/ ceph tell " $pg2 " scrub
894+ ceph tell " $pg2 " scrub
896895 for i in $( seq 1 10 )
897896 do
898897 sleep 0.5
899- stt2=$( bin/ ceph pg " $pg2 " query | jq ' .scrubber' )
898+ stt2=$( ceph pg " $pg2 " query | jq ' .scrubber' )
900899 pg2_is_active=$( echo $stt2 | jq ' .active' )
901900 pg2_is_reserving=$( echo $stt2 | jq ' .is_reserving_replicas' )
902901 if [[ " $pg2_is_active " = " true" && " $pg2_is_reserving " != " true" ]]; then
0 commit comments