Skip to content

Commit

Permalink
reboot machine in testflinger job and re-run DSS validations
Browse files Browse the repository at this point in the history
  • Loading branch information
motjuste committed Dec 3, 2024
1 parent d0c208e commit d638fe7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions contrib/checkbox-dss-validation/testflinger/job-def.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,26 @@ test_data:
ssh ubuntu@$DEVICE_IP '
checkbox-dss.validate-with-gpu
'
# Reboot the machine
ssh -t ubuntu@$DEVICE_IP '
SLEEP_SECS=15
>&2 echo "[INFO]: sleeping for ${SLEEP_SECS} seconds before rebooting."
sleep ${SLEEP_SECS}
>&2 echo "[INFO]: rebooting now. Best of luck!"
sudo reboot
' || >&2 echo "reboot started with exit code $?"
SLEEP_SECS=30
>&2 echo "[INFO]: sleeping for ${SLEEP_SECS} seconds for reboot to finish."
sleep ${SLEEP_SECS}
>&2 echo "[INFO]: attempting to reconnect."
# Re-test after reboot, attempting to connect max 30 times, waiting 10 sec each time
ssh -t ubuntu@$DEVICE_IP -o 'ConnectionAttempts 30' -o 'ConnectTimeout 10' '
SLEEP_SECS=60
>&2 echo "[INFO]: sleeping for ${SLEEP_SECS} seconds for things to settle down a bit."
sleep ${SLEEP_SECS}
sudo microk8s status --wait-ready
checkbox-dss.validate-with-gpu
'

0 comments on commit d638fe7

Please sign in to comment.