Merge pull request 'ci: distinguish why the QA build daemon is unreachable (#25)' (#44) from ci/qa-build-diagnostics into main
Reviewed-on: #44
This commit was merged in pull request #44.
This commit is contained in:
@@ -70,19 +70,35 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for the build daemon
|
- name: Wait for the build daemon
|
||||||
run: |
|
run: |
|
||||||
# A privileged service container is the one runner capability this
|
# dind needs a privileged service container, which is a runner-wide
|
||||||
# workflow cannot verify in advance. Fail here with an explanation
|
# setting this workflow cannot check in advance. The NAS is also slow
|
||||||
# rather than at `docker build` with a connection refused.
|
# to start one, so allow well over the observed time before giving up.
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 90); do
|
||||||
if docker info >/dev/null 2>&1; then
|
if docker info >/dev/null 2>&1; then
|
||||||
echo "Build daemon reachable after ${i}s."
|
echo "Build daemon reachable after ${i}s."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "::error::No Docker daemon at $DOCKER_HOST after 30s."
|
|
||||||
echo "The dind service needs privileged containers. If the runner"
|
echo "::error::No Docker daemon at $DOCKER_HOST after 90s."
|
||||||
echo "forbids them, this workflow cannot build without host socket access."
|
echo ""
|
||||||
|
# These two cases look identical from the failing step but have
|
||||||
|
# completely different fixes, so name which one it is.
|
||||||
|
if getent hosts docker >/dev/null 2>&1; then
|
||||||
|
echo "The 'docker' service host resolves, so the container exists but"
|
||||||
|
echo "dockerd is not accepting connections on 2375. Check that"
|
||||||
|
echo "DOCKER_TLS_CERTDIR is empty, so dind serves plain TCP rather"
|
||||||
|
echo "than TLS on 2376."
|
||||||
|
else
|
||||||
|
echo "The 'docker' service host does not resolve, so the service"
|
||||||
|
echo "container never started. This is what act_runner does when it"
|
||||||
|
echo "refuses a privileged container: it allocates an ID, creation"
|
||||||
|
echo "fails, and the job continues with nothing listening."
|
||||||
|
echo ""
|
||||||
|
echo "Set 'container.privileged: true' in the act_runner config.yaml"
|
||||||
|
echo "and restart the runner. Check the runner's own logs to confirm."
|
||||||
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Record what is being built
|
- name: Record what is being built
|
||||||
|
|||||||
Reference in New Issue
Block a user