mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
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>
This commit is contained in:
parent
e8e70ecbb3
commit
4f49402589
@ -1942,12 +1942,12 @@ function test_mon_osd_pool_set()
|
||||
ceph osd pool set $TEST_POOL_GETSET pgp_num 10
|
||||
|
||||
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))
|
||||
new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3})*32))
|
||||
ceph osd pool set $TEST_POOL_GETSET pg_num $new_pgs
|
||||
ceph osd pool set $TEST_POOL_GETSET pgp_num $new_pgs
|
||||
wait_for_clean
|
||||
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+1))
|
||||
new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3})*32+1))
|
||||
expect_false ceph osd pool set $TEST_POOL_GETSET pg_num $new_pgs
|
||||
|
||||
ceph osd pool set $TEST_POOL_GETSET nosizechange 1
|
||||
|
Loading…
Reference in New Issue
Block a user