From 833dffa6801f6102e2879908882865a649ba1b22 Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Mon, 23 Jan 2023 16:51:25 -0600 Subject: [PATCH] qa/workunits: give telemetry opt-in check more time Previously, we only allotted 2 seconds for the telemetry opt-in status to disappear. However, it sometimes takes longer than this for the ceph status to update. Here, we give the status up to 60 seconds to update. Fixes: https://tracker.ceph.com/issues/58545 Signed-off-by: Laura Flores --- qa/workunits/test_telemetry_pacific_x.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qa/workunits/test_telemetry_pacific_x.sh b/qa/workunits/test_telemetry_pacific_x.sh index f5538cf1185..0e4a832db64 100755 --- a/qa/workunits/test_telemetry_pacific_x.sh +++ b/qa/workunits/test_telemetry_pacific_x.sh @@ -35,11 +35,15 @@ ceph telemetry preview-all ceph telemetry on --license sharing-1-0 ceph telemetry enable channel perf -# Check the warning (should be gone after 2 seconds): -sleep 2 +# Check the warning: +timeout=60 STATUS=$(ceph -s) -if [[ $STATUS == *"Telemetry requires re-opt-in"* ]] -then +until [[ $STATUS != *"Telemetry requires re-opt-in"* ]] || [ $timeout -le 0 ]; do + STATUS=$(ceph -s) + sleep 1 + timeout=$(( timeout - 1 )) +done +if [ $timeout -le 0 ]; then echo "STATUS should not contain re-opt-in warning at this point" exit 1 fi -- 2.47.3