From: Kefu Chai Date: Wed, 7 Jun 2017 01:32:19 +0000 (+0800) Subject: qa/workunits/ceph-helpers.sh: use syntax understood by jq 1.3 X-Git-Tag: v12.1.0~245^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a52445e3c8ba80fa211c603a3871ca44b3a63516;p=ceph.git qa/workunits/ceph-helpers.sh: use syntax understood by jq 1.3 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 --- diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index d8f69604145d..62d0f810e470 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -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() {