Previously the test_rados_tool.sh test was dependant on flag ordering. This mean if you added a new flag after full_quota (such as split_reads or ec_optimizations), this could break the teuthology test if we try to test with these flags on. We prevent this by changing this condition to use json to ensure we are no longer depend on the order of the flags which the default command line output gives.
This also adds a check to ensure the pool name matches what we are working on, to ensure we don't get false-positives if we happened to have other pools.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
$CEPH_TOOL osd pool set-quota $p max_objects 1
V1=`mktemp fooattrXXXXXXX`
$RADOS_TOOL put $OBJ $V1 -p $p
- while ! $CEPH_TOOL osd dump | grep 'full_quota max_objects'
+ while ! $CEPH_TOOL osd dump --format=json | \
+ jq -e ".pools[] | select(.pool_name == \"$p\") | \
+ select(.flags_names | contains(\"full_quota\")) | \
+ select(.quota_max_objects > 0)"
do
sleep 2
done