Commit Graph
8 Commits
Author SHA1 Message Date
kevinveenbirkenbach a715970506 Refactor lint tooling and shell scripts 2026-03-18 12:37:31 +01:00
kevinveenbirkenbach ddfbe001b2 Use container wrapper for logs in health checks and diagnostics
https://chatgpt.com/share/698659d9-62e4-800f-89a1-5d44f309bde4
2026-02-06 22:30:19 +01:00
kevinveenbirkenbach 68157002a2 ci(dns): add AAAA sanity check to prevent CoreDNS SERVFAIL regressions
- Add host-level AAAA DNS sanity test against CoreDNS
- Fail hard on SERVFAIL (breaks Node/getaddrinfo with EAI_AGAIN)
- Allow empty AAAA responses (IPv4-only setup is valid)
- Keep A-record validation unchanged

This prevents silent IPv6 resolver regressions that break CSP checks.

https://chatgpt.com/share/696abc27-19dc-800f-9ead-6598c2f3c302
2026-01-16 23:30:33 +01:00
kevinveenbirkenbach b058377e33 test(dns): make dns test script POSIX-sh compatible for Debian/Ubuntu
- Replace bash-specific [[ ... ]] with POSIX [ ... ] tests
- Use '=' instead of '==' for portable string comparisons
- Fix /bin/sh compatibility (dash) inside docker exec on Debian/Ubuntu
- Prevent DNS test failures caused by non-bash shells

https://chatgpt.com/share/696a9cb2-58e8-800f-8a88-5973d0e1bc40
2026-01-16 21:16:43 +01:00
kevinveenbirkenbach 0ff511293e Add a dedicated Docker-in-Docker DNS self-test and integrate it into the
sys-svc-docker role as a post-restart validation handler.

This change moves the inner-container DNS validation out of the CI test
suite and into the Docker service lifecycle itself, ensuring that DNS is
verified exactly where it matters: inside the Docker-in-Docker daemon.

Key changes:
- Add roles/sys-svc-docker/files/test-dns.sh:
  - Runs inside the DinD container
  - Waits for dockerd readiness
  - Executes a BusyBox test container with explicit --dns
  - Verifies DOMAIN and subdomain resolve to the expected IP
  - Fails hard if DNS is broken

- Register DNS self-test as a docker restart handler:
  - Runs once per deployment
  - Only executed when DOCKER_IN_CONTAINER and MODE_DEBUG are enabled
  - Uses ansible.builtin.script with role_path for correct resolution

- Remove inner Docker DNS test from scripts/tests/dns.sh:
  - CI test suite now only validates host → CoreDNS → outer container chain
  - DinD DNS validation is now part of the Docker service health lifecycle

This ensures that:
- DNS is validated after every Docker restart
- DinD networking failures are detected immediately
- CI and production share the same DNS validation logic
- Docker-in-Docker DNS becomes a first-class health invariant

https://chatgpt.com/share/696a3dda-5c6c-800f-8a16-47c0c604e1e3
2026-01-16 15:07:17 +01:00
kevinveenbirkenbach 35bfbf7d9c fix(dns-tests): make dns.sh shellcheck-clean and harden env validation
- Quote dig server argument to avoid word splitting (SC2086)
- Replace &&/|| pseudo-if with proper if/else blocks (SC2015)
- Validate INFINITO_CONTAINER early via required env guard
- Keep DNS test logic unchanged, only harden correctness and linting

This makes scripts/tests/dns.sh fully shellcheck -x compliant and more robust.

https://chatgpt.com/share/696a4053-93f8-800f-959b-f99e2d7d12e2
2026-01-16 14:42:34 +01:00
kevinveenbirkenbach c7de80fa70 Removed double domain 2026-01-16 14:33:21 +01:00
kevinveenbirkenbach fd983bc69c refactor(ci,network): make DNS, IP and domain configuration fully env-driven
- Introduce env.ci as single source of truth for CI networking
- Make docker-compose, CoreDNS and Docker daemon fully env-driven
- Render CoreDNS Corefile from template via envsubst
- Replace hardcoded IPs/domains with environment variables
- Integrate env-based networking into Ansible defaults
- Remove static Corefile and daemon.json

This makes DNS and networking deterministic and reproducible across
host, CoreDNS, infinito runner and Docker-in-Docker.

https://chatgpt.com/share/696a3dda-5c6c-800f-8a16-47c0c604e1e3
2026-01-16 14:30:14 +01:00