From: huanwen ren Date: Mon, 15 Oct 2018 17:47:07 +0000 (+0800) Subject: qa/osd: fixup osd-rep-recov-eio.sh fails to parse pg dump X-Git-Tag: v14.0.1~27^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f1219d716d7d5c112ffe7128a2c3643714f1beaa;p=ceph.git qa/osd: fixup osd-rep-recov-eio.sh fails to parse pg dump Fixes: http://tracker.ceph.com/issues/36418 Signed-off-by: huanwen ren --- diff --git a/qa/standalone/erasure-code/test-erasure-eio.sh b/qa/standalone/erasure-code/test-erasure-eio.sh index a75b6097f853a..6a58bb83e13a7 100755 --- a/qa/standalone/erasure-code/test-erasure-eio.sh +++ b/qa/standalone/erasure-code/test-erasure-eio.sh @@ -60,7 +60,7 @@ function get_state() { local pgid=$1 local sname=state ceph --format json pg dump pgs 2>/dev/null | \ - jq -r ".[] | select(.pgid==\"$pgid\") | .$sname" + jq -r ".pg_stats | .[] | select(.pgid==\"$pgid\") | .$sname" } function create_erasure_coded_pool() { diff --git a/qa/standalone/osd/osd-backfill-stats.sh b/qa/standalone/osd/osd-backfill-stats.sh index 6ff3c9d86b6a0..e38bece05804c 100755 --- a/qa/standalone/osd/osd-backfill-stats.sh +++ b/qa/standalone/osd/osd-backfill-stats.sh @@ -648,7 +648,7 @@ function TEST_backfill_ec_down_all_out() { while(true) do if test "$(ceph --format json pg dump pgs | - jq '[.[] | .state | select(. == "incomplete")] | length')" -ne "0" + jq '.pg_stats | [.[] | .state | select(. == "incomplete")] | length')" -ne "0" then sleep 2 continue diff --git a/qa/standalone/osd/osd-rep-recov-eio.sh b/qa/standalone/osd/osd-rep-recov-eio.sh index cc86b77052a75..451ad40bff408 100755 --- a/qa/standalone/osd/osd-rep-recov-eio.sh +++ b/qa/standalone/osd/osd-rep-recov-eio.sh @@ -54,7 +54,7 @@ function get_state() { local pgid=$1 local sname=state ceph --format json pg dump pgs 2>/dev/null | \ - jq -r ".[] | select(.pgid==\"$pgid\") | .$sname" + jq -r ".pg_stats | .[] | select(.pgid==\"$pgid\") | .$sname" } function rados_put() { @@ -323,7 +323,7 @@ function TEST_rep_read_unfound() { ceph --format=json pg dump pgs | jq '.' - if ! ceph --format=json pg dump pgs | jq '.[0].state' | grep -q recovery_unfound + if ! ceph --format=json pg dump pgs | jq '.pg_stats | .[0].state' | grep -q recovery_unfound then echo "Failure to get to recovery_unfound state" return 1