From: Laura Flores Date: Mon, 23 Jan 2023 22:51:25 +0000 (-0600) Subject: qa/workunits: give telemetry opt-in check more time X-Git-Tag: v18.1.0~418^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=833dffa6801f6102e2879908882865a649ba1b22;p=ceph.git 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 --- diff --git a/qa/workunits/test_telemetry_pacific_x.sh b/qa/workunits/test_telemetry_pacific_x.sh index f5538cf118544..0e4a832db64f6 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