diff options
author | Kefu Chai <tchaikov@gmail.com> | 2018-09-17 16:35:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-17 16:35:43 +0200 |
commit | 338612ad88627ec338df3c4ec607a457a66e12ff (patch) | |
tree | dd271a4c47c5c64382cf8dd375b8c531a01b4af1 /qa/standalone | |
parent | Merge pull request #24087 from rzarzynski/wip-common-buffer_raw-drop-page-ali... (diff) | |
parent | test: osd-backfill-stats.sh: Fix subtests to get primary which can change (diff) | |
download | ceph-338612ad88627ec338df3c4ec607a457a66e12ff.tar.xz ceph-338612ad88627ec338df3c4ec607a457a66e12ff.zip |
Merge pull request #24088 from dzafman/wip-35982
qa/standalone: Standalone test corrections
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'qa/standalone')
-rwxr-xr-x | qa/standalone/osd/osd-backfill-stats.sh | 36 | ||||
-rwxr-xr-x | qa/standalone/special/ceph_objectstore_tool.py | 2 |
2 files changed, 28 insertions, 10 deletions
diff --git a/qa/standalone/osd/osd-backfill-stats.sh b/qa/standalone/osd/osd-backfill-stats.sh index 7631029eeaa..6ff3c9d86b6 100755 --- a/qa/standalone/osd/osd-backfill-stats.sh +++ b/qa/standalone/osd/osd-backfill-stats.sh @@ -345,8 +345,11 @@ function TEST_backfill_out2() { ceph osd pool set $poolname size 3 ceph osd out osd.${otherosd} ceph osd out osd.${primary} + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 wait_for_clean || return 1 @@ -399,8 +402,11 @@ function TEST_backfill_sizeup4_allout() { ceph osd out osd.$otherosd ceph osd out osd.$primary ceph osd pool set $poolname size 4 + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 wait_for_clean || return 1 @@ -461,10 +467,10 @@ function TEST_backfill_remapped() { # primary may change due to invalidating the old pg_temp, which was [1,2,0], # but up_primary (3) chooses [0,1] for acting. - local new_primary=$(get_primary $poolname obj1) + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -472,7 +478,7 @@ function TEST_backfill_remapped() { local misplaced=$(expr $objects \* 2) - check $dir $PG $new_primary replicated 0 0 $misplaced $objects || return 1 + check $dir $PG $primary replicated 0 0 $misplaced $objects || return 1 delete_pool $poolname kill_daemons $dir || return 1 @@ -520,8 +526,11 @@ function TEST_backfill_ec_all_out() { do ceph osd out osd.$o done + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 wait_for_clean || return 1 @@ -567,8 +576,11 @@ function TEST_backfill_ec_prim_out() { ceph osd set nobackfill ceph osd out osd.$primary + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 wait_for_clean || return 1 @@ -622,8 +634,11 @@ function TEST_backfill_ec_down_all_out() { do ceph osd out osd.$o done + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 flush_pg_stats @@ -703,8 +718,11 @@ function TEST_backfill_ec_down_out() { kill $(cat $dir/osd.${otherosd}.pid) ceph osd down osd.${otherosd} ceph osd out osd.${otherosd} + # Primary might change before backfill starts + sleep 2 + primary=$(get_primary $poolname obj1) ceph osd unset nobackfill - ceph tell osd.$(get_primary $poolname obj1) debug kick_recovery_wq 0 + ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 wait_for_clean || return 1 diff --git a/qa/standalone/special/ceph_objectstore_tool.py b/qa/standalone/special/ceph_objectstore_tool.py index d764c9fa58b..d0926872559 100755 --- a/qa/standalone/special/ceph_objectstore_tool.py +++ b/qa/standalone/special/ceph_objectstore_tool.py @@ -983,7 +983,7 @@ def main(argv): # On import can't specify a PG with a bad seed TMPPG="{pool}.80".format(pool=REPID) cmd = (CFSD_PREFIX + "--op import --pgid {pg} --file {file}").format(osd=ONEOSD, pg=TMPPG, file=OTHERFILE) - ERRORS += test_failure(cmd, "Illegal pgid, the seed is larger than current pg_num") + ERRORS += test_failure(cmd, "PG {pg} no longer exists".format(pg=TMPPG)) os.unlink(OTHERFILE) cmd = (CFSD_PREFIX + "--op import --file {FOO}").format(osd=ONEOSD, FOO=OTHERFILE) |