]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/standalone/osd: Modify osd tests for mclock scheduler
authorSridhar Seshasayee <sseshasa@redhat.com>
Wed, 16 Jun 2021 11:26:54 +0000 (16:56 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Fri, 30 Jul 2021 12:46:00 +0000 (18:16 +0530)
Modified test cases:
1. osd-recovery-prio.sh:
   Set osd_op_queue = wpq for all tests since mclock
   doesn't consider recovery priority as part of its
   scheduling algorithm.

2. osd-recovery-stats.sh:
   a. TEST_recovery_undersized():
     - Set osd_mclock_profile to high_recovery_ops profile.
     - Increase wait for recovery timeout to 300 secs.

3. osd-rep-recov-eio.sh:
   a. TEST_rep_backfill_unfound():
     - Set osd_mclock_profile to high_recovery_ops profile.
     - Increase wait for backfill_unfound to 360 secs.

4. repeer-on-acting-back.sh:
   a. TEST_repeer_on_down_act():
     - Set osd_mclock_profile to high_recovery_ops profile.
       (To improve the test duration)

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
qa/standalone/osd/osd-recovery-prio.sh
qa/standalone/osd/osd-recovery-stats.sh
qa/standalone/osd/osd-rep-recov-eio.sh
qa/standalone/osd/repeer-on-acting-back.sh

index f5d7928c8511b13ab4d81dca436e92abae01c024..02b65f67a27050d19fe7db874bbee9e1c1690ba5 100755 (executable)
@@ -25,7 +25,10 @@ function run() {
     export CEPH_MON="127.0.0.1:7114" # git grep '\<7114\>' : there must be only one
     export CEPH_ARGS
     CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=$CEPH_MON --osd_max_backfills=1 --debug_reserver=20"
+    CEPH_ARGS+="--mon-host=$CEPH_MON --osd_max_backfills=1 --debug_reserver=20 "
+    # Set osd op queue = wpq for the tests. Recovery priority is not
+    # considered by mclock_scheduler leading to unexpected results.
+    CEPH_ARGS+="--osd-op-queue=wpq "
     export objects=200
     export poolprefix=test
     export FORCE_PRIO="255"    # See OSD_RECOVERY_PRIORITY_FORCED
index 7d88e98a0c09e4844ebeb5e4fa35d29c41617305..42347510f6aa2b3e344816cfa3308628d2b6c60f 100755 (executable)
@@ -28,6 +28,8 @@ function run() {
     CEPH_ARGS+="--mon-host=$CEPH_MON "
     # so we will not force auth_log_shard to be acting_primary
     CEPH_ARGS+="--osd_force_auth_primary_missing_objects=1000000 "
+    # Use "high_recovery_ops" profile if mclock_scheduler is enabled.
+    CEPH_ARGS+="--osd-mclock-profile=high_recovery_ops "
     export margin=10
     export objects=200
     export poolname=test
@@ -347,13 +349,13 @@ function TEST_recovery_undersized() {
     # Wait for recovery to finish
     # Can't use wait_for_clean() because state goes from active+recovering+undersized+degraded
     # to  active+undersized+degraded
-    for i in $(seq 1 60)
+    for i in $(seq 1 300)
     do
       if ceph pg dump pgs | grep ^$PG | grep -qv recovering
       then
           break
       fi
-      if [ $i = "60" ];
+      if [ $i = "300" ];
       then
           echo "Timeout waiting for recovery to finish"
           return 1
index bf1adde9892d93e57381a80453eae142ae998ef2..6f871ef8fa8c8c303ec19a89837409dbbb57405b 100755 (executable)
@@ -29,6 +29,7 @@ function run() {
     export CEPH_ARGS
     CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
     CEPH_ARGS+="--mon-host=$CEPH_MON "
+    CEPH_ARGS+="--osd-mclock-profile=high_recovery_ops "
 
 
     local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
@@ -301,7 +302,7 @@ function TEST_rep_backfill_unfound() {
 
     sleep 15
 
-    for tmp in $(seq 1 100); do
+    for tmp in $(seq 1 360); do
       state=$(get_state 2.0)
       echo $state | grep backfill_unfound
       if [ "$?" = "0" ]; then
index af406ef926b28d5037f3763e843f38c7e4bbcb80..2a7e8a0ce4c8efb87b868a879e18b27d58eb2c26 100755 (executable)
@@ -34,6 +34,7 @@ function run() {
     CEPH_ARGS+="--osd_force_auth_primary_missing_objects=1000000 "
     # use small pg_log settings, so we always do backfill instead of recovery
     CEPH_ARGS+="--osd_min_pg_log_entries=$loglen --osd_max_pg_log_entries=$loglen --osd_pg_log_trim_min=$trim "
+    CEPH_ARGS+="--osd_mclock_profile=high_recovery_ops "
 
     local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
     for func in $funcs ; do