]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/ceph-helpers.sh: use syntax understood by jq 1.3 15530/head
authorKefu Chai <kchai@redhat.com>
Wed, 7 Jun 2017 01:32:19 +0000 (09:32 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 7 Jun 2017 01:32:21 +0000 (09:32 +0800)
trusty still ships jq 1.3 which does not offer "first". see
https://stedolan.github.io/jq/manual/v1.3/ .

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/ceph-helpers.sh

index d8f69604145d5eb459f51008c73083abe3b0b7e2..62d0f810e47077c8b7e9094f9cacaabf02369aff 100755 (executable)
@@ -967,7 +967,7 @@ function get_not_primary() {
 
     local primary=$(get_primary $poolname $objectname)
     ceph --format json osd map $poolname $objectname 2>/dev/null | \
-        jq ".acting | map(select (. != $primary)) | first"
+        jq ".acting | map(select (. != $primary)) | .[0]"
 }
 
 function test_get_not_primary() {