Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reboot and re-test to Testflinger job for DSS validation (New) #1634

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
'
Loading