From ca01669fc556ff1b343e905e271b66406f29697b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 8 Sep 2026 18:46:50 +0200 Subject: [PATCH] fix(guide): give the host-mode replay the resolver compose mode already has utils/roles/guide.py picks "compose" if the role ships a stack and "host" otherwise. The compose branch runs make compose-up, which starts the coredns service from compose.yml, so the replay resolves the deployment's own names. The host branch runs this script, a bare container on the default bridge with no resolver anywhere. That only started to matter with 4986e80dd4, which threaded DOMAIN into the README replay so it deploys under INFINITO_DOMAIN instead of inheriting infinito.localhost. Before it, sys-svc-nss resolved *.localhost through nss-myhostname and no DNS server was needed; after it, a stackless role asks for infinito.test and gets nothing. web-svc-html shows the whole chain in run 33923190220. Its guide replay logs "Verify 'html.infinito.test' is served after the reload" with [Errno -2] Name or service not known, sys-ctl-hlth-webserver probes every NGINX domain and exits 1 through script.py's `return 1 if errors else 0`, systemd refuses to start hlth-webserver, and sys-service-terminator fails the play after 25 attempts. The same run's Fider replay, a compose-mode role, answers the identical task with real HTTP headers. Rather than rebuild the resolver by hand, the script now brings up the very service the compose branch uses and reads the network back off the container, so subnet, gateway, MTU, image, Corefile and command all stay in compose.yml. The Corefile is rendered through CoreDNSCorefileRenderer so the script does not depend on an earlier phase having produced it. coredns declares no depends_on, so the infinito service stays down and INFINITO_IP4 is free for the guide container; the run's own log shows the CI phase removing infinito-nexus-core_default seventeen seconds before the replay starts. -v /srv is the second failure in the same class. svc-storage-nfs-server dies with "mount.nfs4 ... reason given by server: No such file or directory" on a host reporting Storage Driver: overlay2, because name_to_handle_at answers EOPNOTSUPP there and the server builds no export root. A real volume under the export path takes it off the overlay. --- scripts/github/guide/host_deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/github/guide/host_deploy.sh b/scripts/github/guide/host_deploy.sh index 5d78d7a9e9..e215613211 100755 --- a/scripts/github/guide/host_deploy.sh +++ b/scripts/github/guide/host_deploy.sh @@ -44,14 +44,20 @@ BOOT_IMAGE="guide-boot:${GUIDE_ROLE}" docker commit "${PREP}" "${BOOT_IMAGE}" >/dev/null docker rm -f "${PREP}" >/dev/null 2>&1 || true # nocheck: shell-or-true -- cleanup of a possibly already-removed container +python3 -c 'from pathlib import Path; from cli.administration.deploy.development.coredns import CoreDNSCorefileRenderer; CoreDNSCorefileRenderer(repo_root=Path(".")).render(show_preview=False)' +docker compose up -d coredns +GUIDE_NET="$(docker inspect -f '{{range $k, $v := .NetworkSettings.Networks}}{{$k}}{{end}}' "${INFINITO_RUNNER_PREFIX}-coredns")" + CID="$(docker run -d --privileged --cgroupns=host \ + --network "${GUIDE_NET}" --ip "${INFINITO_IP4}" --dns "${INFINITO_DNS_IP}" \ -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ --tmpfs /run --tmpfs /run/lock \ + -v /srv \ -v "${PWD}:${PWD}" \ --entrypoint /sbin/init \ "${BOOT_IMAGE}")" # shellcheck disable=SC2154 -trap 'rc=$?; if [ "${rc}" -ne 0 ]; then _rescue="${INFINITO_RESCUE_DIAGNOSTICS_BASE}/${INFINITO_DISTRO}/${GUIDE_ROLE}"; INFINITO_RESCUE_DIAGNOSTICS_DIR="${_rescue}" python3 utils/diagnostics/container.py "${GUIDE_ROLE}" "guide host boot failure" || true; bash scripts/tests/deploy/utils/rescue_index.sh "${_rescue}"; fi; docker rm -f "${CID}" >/dev/null 2>&1 || true; docker rmi -f "${BOOT_IMAGE}" >/dev/null 2>&1 || true' EXIT # nocheck: shell-or-true -- best-effort diagnostics + teardown in the EXIT trap +trap 'rc=$?; if [ "${rc}" -ne 0 ]; then _rescue="${INFINITO_RESCUE_DIAGNOSTICS_BASE}/${INFINITO_DISTRO}/${GUIDE_ROLE}"; INFINITO_RESCUE_DIAGNOSTICS_DIR="${_rescue}" python3 utils/diagnostics/container.py "${GUIDE_ROLE}" "guide host boot failure" || true; bash scripts/tests/deploy/utils/rescue_index.sh "${_rescue}"; fi; docker rm -f -v "${CID}" >/dev/null 2>&1 || true; docker compose down >/dev/null 2>&1 || true; docker rmi -f "${BOOT_IMAGE}" >/dev/null 2>&1 || true' EXIT # nocheck: shell-or-true -- best-effort diagnostics + teardown in the EXIT trap for _ in $(seq 1 40); do state="$(docker exec "${CID}" systemctl is-system-running 2>/dev/null || true)"