diff --git a/.github/workflows/test-on-droplets-matrix.yml b/.github/workflows/test-on-droplets-matrix.yml index c929403ba..e7e7f5d17 100644 --- a/.github/workflows/test-on-droplets-matrix.yml +++ b/.github/workflows/test-on-droplets-matrix.yml @@ -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: |