From e018d778ecb70ccced8a77adb5d1a4cbcf8397e3 Mon Sep 17 00:00:00 2001 From: Kamoltat Sirivadhna Date: Wed, 26 Nov 2025 21:24:25 +0000 Subject: [PATCH] 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 --- qa/standalone/ceph-helpers.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"* ]] } -- 2.47.3