]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test_rados_tool - change check on osd dump command to use json 66459/head
authorJon Bailey <jonathan.bailey1@ibm.com>
Tue, 26 May 2026 12:31:47 +0000 (13:31 +0100)
committerJon Bailey <jonathan.bailey1@ibm.com>
Thu, 28 May 2026 14:15:51 +0000 (15:15 +0100)
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>
qa/workunits/rados/test_rados_tool.sh

index 9febc4a45248814dfd1043a2d983cdc41194c1cc..47c890c403d69e52f2e7b5608e378cfd64c2bef1 100755 (executable)
@@ -347,7 +347,10 @@ test_rmobj() {
     $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