Skip to content

Commit

Permalink
Fix: If fails restart the supervisor and try again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres D. Molins committed Oct 12, 2023
1 parent c808e7f commit 3c4ca96
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test-on-droplets-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,19 @@ jobs:
if: always()
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-${{ matrix.os_config.alias }}-${{ matrix.check_vm.alias }} --output json | ./.github/scripts/extract_droplet_ipv4.py)"
export FASTAPI_URL="http://${DROPLET_IPV4}:4020/status/check/fastapi${{ matrix.check_vm.query_params }}"
curl --retry 5 --max-time 10 --fail "http://${DROPLET_IPV4}:4020/about/usage/system"
curl --retry 5 --max-time 10 --fail "http://${DROPLET_IPV4}:4020/status/check/fastapi${{ matrix.check_vm.query_params }}"
if curl --retry 5 --max-time 10 --fail ${FASTAPI_URL}
else
# If the first execution fails, restart supervisor and try again
ssh root@${DROPLET_IPV4} "systemctl restart aleph-vm-supervisor"
sleep 5
curl --retry 5 --max-time 10 --fail ${FASTAPI_URL}
fi
- name: Schedule an instance on the Droplet by faking a call from the scheduler
run: |
Expand Down

0 comments on commit 3c4ca96

Please sign in to comment.