From: Kamoltat Sirivadhna Date: Wed, 26 Nov 2025 21:24:25 +0000 (+0000) Subject: qa/ceph-helpers.sh: added time out to ceph pg $pgid query -f json X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e018d778ecb70ccced8a77adb5d1a4cbcf8397e3;p=ceph-ci.git qa/ceph-helpers.sh: added time out to ceph pg $pgid query -f json Fixes: https://tracker.ceph.com/issues/74004 Signed-off-by: Kamoltat Sirivadhna --- diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index ccf5f63ee87..8c974f4d4cf 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -1571,7 +1571,10 @@ function test_is_clean() { function is_pg_clean() { local pgid=$1 local pg_state - pg_state=$(ceph pg $pgid query 2>/dev/null | jq -r ".state ") + pg_state=$(timeout 120 bash -c "ceph pg $pgid query -f json" 2>/dev/null | jq -r ".state ") + if [[ $? -eq 124 ]]; then + echo "WARN: timeout running 'ceph pg $pgid query'" >&2 + fi [[ "$pg_state" == "active+clean"* ]] }