]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Use activate_osd() when restarting OSDs
authorDavid Zafman <dzafman@redhat.com>
Thu, 5 Dec 2019 23:13:31 +0000 (15:13 -0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 13 Feb 2020 14:03:00 +0000 (15:03 +0100)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 43f6218993bac14d0b01e1da5c14840433bae12b)

qa/standalone/erasure-code/test-erasure-eio.sh
qa/standalone/osd/ec-error-rollforward.sh
qa/standalone/osd/osd-bluefs-volume-ops.sh
qa/standalone/osd/osd-dup.sh
qa/standalone/osd/osd-recovery-stats.sh
qa/standalone/osd/osd-rep-recov-eio.sh
qa/standalone/osd/repro_long_log.sh
qa/standalone/scrub/osd-scrub-repair.sh

index ce234d4adbd4f3c131c3e0df080c22e1a3bcb305..fb1a1a2c3a05f51795978575af83939836a4a56c 100755 (executable)
@@ -173,7 +173,7 @@ function rados_put_get_data() {
         ceph osd out ${last_osd} || return 1
         ! get_osds $poolname $objname | grep '\<'${last_osd}'\>' || return 1
         ceph osd in ${last_osd} || return 1
-        run_osd $dir ${last_osd} || return 1
+        activate_osd $dir ${last_osd} || return 1
         wait_for_clean || return 1
     fi
 
@@ -373,7 +373,7 @@ function TEST_ec_object_attr_read_error() {
     inject_eio ec mdata $poolname $objname $dir 1 || return 1
 
     # Restart OSD
-    run_osd $dir ${primary_osd} || return 1
+    activate_osd $dir ${primary_osd} || return 1
 
     # Cluster should recover this object
     wait_for_clean || return 1
@@ -541,7 +541,7 @@ function TEST_ec_backfill_unfound() {
     inject_eio ec data $poolname $testobj $dir 0 || return 1
     inject_eio ec data $poolname $testobj $dir 1 || return 1
 
-    run_osd $dir ${last_osd} || return 1
+    activate_osd $dir ${last_osd} || return 1
     ceph osd in ${last_osd} || return 1
 
     sleep 15
@@ -621,7 +621,7 @@ function TEST_ec_recovery_unfound() {
     inject_eio ec data $poolname $testobj $dir 0 || return 1
     inject_eio ec data $poolname $testobj $dir 1 || return 1
 
-    run_osd $dir ${last_osd} || return 1
+    activate_osd $dir ${last_osd} || return 1
     ceph osd in ${last_osd} || return 1
 
     sleep 15
index 05188ad509653bc95eaaf0816a4b7d5346166bf8..410d5134d536a455a8db85f3a7d4e4cbd58b3c77 100755 (executable)
@@ -53,10 +53,10 @@ function TEST_ec_error_rollforward() {
     kill $pids
     wait
 
-    run_osd $dir 0 || return 1
-    run_osd $dir 1 || return 1
-    run_osd $dir 2 || return 1
-    run_osd $dir 3 || return 1
+    activate_osd $dir 0 || return 1
+    activate_osd $dir 1 || return 1
+    activate_osd $dir 2 || return 1
+    activate_osd $dir 3 || return 1
 
     wait_for_clean || return 1
 }
index 5258cfc6d5bdd01607aedf66ab2cccb27473bf2d..1c9c5cf2a9953c36b39bbc4ab1176b8f9a45e64a 100755 (executable)
@@ -140,13 +140,13 @@ function TEST_bluestore() {
 
     ceph-bluestore-tool --path $dir/3 fsck || return 1
 
-    run_osd $dir 0 || return 1
+    activate_osd $dir 0 || return 1
     osd_pid0=$(cat $dir/osd.0.pid)
-    run_osd $dir 1 || return 1
+    activate_osd $dir 1 || return 1
     osd_pid1=$(cat $dir/osd.1.pid)
-    run_osd $dir 2 || return 1
+    activate_osd $dir 2 || return 1
     osd_pid2=$(cat $dir/osd.2.pid)
-    run_osd $dir 3 || return 1
+    activate_osd $dir 3 || return 1
     osd_pid3=$(cat $dir/osd.3.pid)
 
     wait_for_clean || return 1
@@ -218,13 +218,13 @@ function TEST_bluestore() {
 
     ceph-bluestore-tool --path $dir/3 fsck || return 1
 
-    run_osd $dir 0 || return 1
+    activate_osd $dir 0 || return 1
     osd_pid0=$(cat $dir/osd.0.pid)
-    run_osd $dir 1 || return 1
+    activate_osd $dir 1 || return 1
     osd_pid1=$(cat $dir/osd.1.pid)
-    run_osd $dir 2 || return 1
+    activate_osd $dir 2 || return 1
     osd_pid2=$(cat $dir/osd.2.pid)
-    run_osd $dir 3 || return 1
+    activate_osd $dir 3 || return 1
     osd_pid3=$(cat $dir/osd.3.pid)
 
     # write some objects
@@ -324,13 +324,13 @@ function TEST_bluestore() {
 
     ceph-bluestore-tool --path $dir/3 fsck || return 1
 
-    run_osd $dir 0 || return 1
+    activate_osd $dir 0 || return 1
     osd_pid0=$(cat $dir/osd.0.pid)
-    run_osd $dir 1 || return 1
+    activate_osd $dir 1 || return 1
     osd_pid1=$(cat $dir/osd.1.pid)
-    run_osd $dir 2 || return 1
+    activate_osd $dir 2 || return 1
     osd_pid2=$(cat $dir/osd.2.pid)
-    run_osd $dir 3 || return 1
+    activate_osd $dir 3 || return 1
     osd_pid3=$(cat $dir/osd.3.pid)
 
     # write some objects
index 26f583b9990ec0c4aa89d2aa6f884914aa0cb976..fdb2649ca055539917639fa6ef2ee88352713564 100755 (executable)
@@ -61,7 +61,7 @@ function TEST_filestore_to_bluestore() {
                          --op dup || return 1
     CEPH_ARGS=$O
 
-    run_osd $dir 0 || return 1
+    activate_osd $dir 0 || return 1
 
     while ! ceph osd stat | grep '3 up' ; do sleep 1 ; done
     ceph osd metadata 0 | grep bluestore || return 1
index 01f163ea5aa74d04fa9781e791e7c9cd89c6333e..04a287942fce71b92149dcc15d36746d3b453970 100755 (executable)
@@ -472,7 +472,7 @@ function TEST_recovery_multi() {
 
     kill $(cat $dir/osd.${primary}.pid)
     ceph osd down osd.${primary}
-    run_osd $dir ${otherosd}
+    activate_osd $dir ${otherosd}
     sleep 3
 
     for i in $(seq $(expr $half + 1) $objects)
@@ -485,7 +485,7 @@ function TEST_recovery_multi() {
 
     ceph osd unset noout
     ceph osd out osd.$primary osd.$otherosd
-    run_osd $dir ${primary}
+    activate_osd $dir ${primary}
     sleep 3
 
     ceph osd pool set test size 4
index 6e9eeac3945012f6e76ada2bb809a3916a11b5a2..8dce41a98bbfd1906e277c75b1471b714de4a99d 100755 (executable)
@@ -208,7 +208,7 @@ function TEST_rep_backfill_unfound() {
     inject_eio rep data $poolname $testobj $dir 0 || return 1
     inject_eio rep data $poolname $testobj $dir 1 || return 1
 
-    run_osd $dir ${last_osd} || return 1
+    activate_osd $dir ${last_osd} || return 1
     ceph osd in ${last_osd} || return 1
 
     sleep 15
@@ -285,7 +285,7 @@ function TEST_rep_recovery_unfound() {
     inject_eio rep data $poolname $testobj $dir 0 || return 1
     inject_eio rep data $poolname $testobj $dir 1 || return 1
 
-    run_osd $dir ${last_osd} || return 1
+    activate_osd $dir ${last_osd} || return 1
     ceph osd in ${last_osd} || return 1
 
     sleep 15
index 7284fedb203f87dc5e8bc9636036f4f47471e7bf..97d572e553f491764aa65de74f48d64b02298c80 100755 (executable)
@@ -105,7 +105,7 @@ function TEST_repro_long_log2()
     local PRIMARY=$(ceph pg $PGID query  | jq '.info.stats.up_primary')
     kill_daemons $dir TERM osd.$PRIMARY || return 1
     CEPH_ARGS="--osd-max-pg-log-entries=2 --no-mon-config" ceph-objectstore-tool --data-path $dir/$PRIMARY --pgid $PGID --op trim-pg-log || return 1
-    run_osd $dir $PRIMARY || return 1
+    activate_osd $dir $PRIMARY || return 1
     wait_for_clean || return 1
     test_log_size $PGID 2 || return 1
 }
index 3acc0d8b47d8fdc1831d6e77a35e9b19496e1f71..578998e5f6d6d8f4a26dae8982f4d962887045ed 100755 (executable)
@@ -600,8 +600,8 @@ function TEST_repair_stats() {
       OSD=$(expr $i % 2)
       _objectstore_tool_nodown $dir $OSD obj$i remove || return 1
     done
-    run_osd $dir $primary $ceph_osd_args || return 1
-    run_osd $dir $other $ceph_osd_args || return 1
+    activate_osd $dir $primary $ceph_osd_args || return 1
+    activate_osd $dir $other $ceph_osd_args || return 1
     wait_for_clean || return 1
 
     repair $pgid
@@ -673,8 +673,8 @@ function TEST_repair_stats_ec() {
       OSD=$(expr $i % 2)
       _objectstore_tool_nodown $dir $OSD obj$i remove || return 1
     done
-    run_osd $dir $primary $ceph_osd_args || return 1
-    run_osd $dir $other $ceph_osd_args || return 1
+    activate_osd $dir $primary $ceph_osd_args || return 1
+    activate_osd $dir $other $ceph_osd_args || return 1
     wait_for_clean || return 1
 
     repair $pgid