]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/workunits: give telemetry opt-in check more time
authorLaura Flores <lflores@redhat.com>
Mon, 23 Jan 2023 22:51:25 +0000 (16:51 -0600)
committerLaura Flores <lflores@redhat.com>
Mon, 23 Jan 2023 22:51:25 +0000 (16:51 -0600)
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 <lflores@redhat.com>
qa/workunits/test_telemetry_pacific_x.sh

index f5538cf1185445bf8db471a008bbd77b843799d3..0e4a832db64f6785cb9590625586730d5d8c335f 100755 (executable)
@@ -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