]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/workunits/cephtool/test.sh: ceph osd stat out has changed, fix tests for that 16403/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 19 Jul 2017 12:12:16 +0000 (14:12 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 19 Jul 2017 14:34:12 +0000 (16:34 +0200)
commit4f49402589341911df397110d6be9d51f209f823
tree3fc9f7baff543426199205219ef785e8126bfdb7
parente8e70ecbb3d7159fc9ccb15c04391e9a5c2fa9a8
qa/workunits/cephtool/test.sh: ceph osd stat out has changed, fix tests for that

The output of ceph osd stat has changed,
It printed:

cluster b370a29d-9287-4ca3-ab57-3d824f65e339
 health HEALTH_OK
 monmap e1: 1 mons at {ceph1=10.0.0.8:6789/0}, election epoch 2, quorum 0 ceph1
 osdmap e63: 2 osds: 2 up, 2 in
  pgmap v41338: 952 pgs, 20 pools, 17130 MB data, 2199 objects
        115 GB used, 167 GB / 297 GB avail
             952 active+clean

but now the osdmap line has gone and thus this no longer works:
qa/workunits/cephtool/test.sh:1944:
old_pgs=$(ceph osd pool get $TEST_POOL_GETSET pg_num | sed -e 's/pg_num: //')
new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3}')*32))

4: qa/workunits/cephtool/test.sh: line 1945: 10+*32: syntax errotoken is "*32")

 - And parse the output in json , with jq, for better reliability

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
qa/workunits/cephtool/test.sh