]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/osd: fixup osd-rep-recov-eio.sh fails to parse pg dump 24579/head
authorhuanwen ren <ren.huanwen@zte.com.cn>
Mon, 15 Oct 2018 17:47:07 +0000 (01:47 +0800)
committerhuanwen ren <ren.huanwen@zte.com.cn>
Mon, 15 Oct 2018 18:18:22 +0000 (02:18 +0800)
Fixes: http://tracker.ceph.com/issues/36418
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
qa/standalone/erasure-code/test-erasure-eio.sh
qa/standalone/osd/osd-backfill-stats.sh
qa/standalone/osd/osd-rep-recov-eio.sh

index a75b6097f853a6ff9b84ae83de7521b8ba665690..6a58bb83e13a70d66df6a6f020a74a91f2df84d1 100755 (executable)
@@ -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() {
index 6ff3c9d86b6a0793883b0fc5ec368c78895a6b46..e38bece05804cea6872f0703f625bc05d7817318 100755 (executable)
@@ -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
index cc86b77052a75a2bf188d052a72e2f100fcb039d..451ad40bff408340c785faf82ef067d53f369d1b 100755 (executable)
@@ -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