7.0 KiB
7.0 KiB
Experiments
E01: DNS latency measurement before and after daemon.json fix
- Verifies: C01, C02
- Setup:
- System: Unraid UM790 Pro, 32GB RAM, Docker Engine (version not specified in source material)
- Network: Default docker0 bridge (
172.17.0.0/16), Technitium DNS in host network mode - Containers under test: Any bridge-networked container (e.g., nanobot container)
- Pre-condition:
/etc/docker/daemon.jsondoes NOT yet contain the172.17.0.1DNS override
- Procedure:
- From inside a bridge-networked container, run repeated
digornslookupqueries for a known hostname (e.g.,google.com) and record round-trip time for each query. - Inspect the container's
/etc/resolv.confto confirm the nameserver order:192.168.1.50,169.254.24.117,1.1.1.1. - Test reachability of
192.168.1.50:53via UDP from inside the container (e.g.,nc -u -w 1 192.168.1.50 53). Confirm it times out. - Test reachability of
172.17.0.1:53via UDP from inside the container. Confirm it responds. - On the Unraid host, add
{"dns": ["172.17.0.1"]}to/etc/docker/daemon.jsonand restart the Docker daemon (systemctl restart dockeror equivalent). - Recreate the test container (daemon.json changes only apply to newly started containers).
- Repeat the DNS latency measurements from step 1 inside the new container.
- Inspect the new container's
/etc/resolv.confto confirm it now lists only172.17.0.1.
- From inside a bridge-networked container, run repeated
- Metrics: DNS query round-trip time in milliseconds (before and after), nameserver list in resolv.conf (before and after)
- Expected outcome:
- Before: ~8-second query time (timeout waiting for
192.168.1.50), resolv.conf lists192.168.1.50first - After: ~2ms query time, resolv.conf lists only
172.17.0.1 172.17.0.1:53responds;192.168.1.50:53does not respond from inside bridge container
- Before: ~8-second query time (timeout waiting for
- Baselines: DNS query latency via
1.1.1.1directly (should be fast, demonstrating the delay is nameserver ordering, not network latency) - Dependencies: none
E02: Verify resolv.conf edit failure mode (controlled reproduction)
- Verifies: C06
- Setup:
- System: Any Docker bridge-networked container on the Unraid host
- Container: Disposable test container (NOT the nanobot container or any production container)
- Pre-condition: Container has working DNS (post-E01 fix,
172.17.0.1as nameserver)
- Procedure:
- Inspect the container's
/etc/resolv.conf— note current working nameserver (172.17.0.1). - Inside the container, overwrite
/etc/resolv.confwith only a non-reachable nameserver (e.g.,nameserver 192.0.2.1— the TEST-NET range, guaranteed unreachable). - Immediately attempt DNS resolution from inside the container (e.g.,
ping google.com). Observe failure. - Without touching the container, check another bridge-networked container's DNS — confirm it is unaffected.
- Recreate (stop and start) the test container. Inspect
/etc/resolv.conf— confirm Docker has regenerated it from daemon.json, overwriting the manual change.
- Inspect the container's
- Metrics: DNS resolution success/failure before and after
/etc/resolv.confedit, DNS resolution in sibling container (should be unaffected), resolv.conf content after container recreation - Expected outcome:
- After edit: DNS fails in the edited container, succeeds in all other containers
- After recreation: resolv.conf is restored to daemon.json-derived content (
nameserver 172.17.0.1) - Confirms: the edit is container-scoped and non-persistent
- Baselines: Sibling container DNS behavior (unchanged throughout)
- Dependencies: E01
E03: Traefik ACME certificate acquisition with and without explicit resolver
- Verifies: C03, C05
- Setup:
- System: Unraid host with Traefik running in bridge-networked Docker container
- Traefik version: v2.x (exact version not specified in source material)
- DNS: Technitium DNS at
172.17.0.1:53(post-E01 fix) - Domain:
wylab.me(with valid public DNS delegation for HTTP-01 or DNS-01 challenge) - Pre-condition: Traefik static config does NOT yet have
resolversfield in certificatesResolvers
- Procedure:
- Configure Traefik with a
certificatesResolversblock pointing to Let's Encrypt (staging endpoint recommended for testing). - Without the
resolversfield, force Traefik to request a certificate for a test subdomain (e.g.,test.wylab.me). - Observe whether Traefik successfully resolves
acme-v02.api.letsencrypt.organd completes the challenge. Check Traefik logs for DNS resolution errors. - Simulate Technitium unavailability (stop the Technitium container). Repeat the certificate request. Observe failure.
- Re-add the
resolvers = ["1.1.1.1:53"]field to the certificatesResolvers configuration. - Restart Traefik. With Technitium stopped, attempt certificate acquisition again.
- Observe that certificate acquisition succeeds despite Technitium being unavailable.
- Test that
http://172.17.0.1:PORTcorrectly reaches a host-networked service from Traefik's perspective.
- Configure Traefik with a
- Metrics: Certificate acquisition success/failure, Traefik log error messages related to DNS, time to certificate acquisition
- Expected outcome:
- Without
resolvers: Certificate acquisition fails or is at risk when Technitium is unavailable - With
resolvers = ["1.1.1.1:53"]: Certificate acquisition succeeds independently of Technitium state - Backend at
http://172.17.0.1:PORTis reachable from Traefik;http://127.0.0.1:PORTis not
- Without
- Baselines: Traefik certificate acquisition using system resolver (Technitium); direct curl to
https://acme-v02.api.letsencrypt.orgfrom the Traefik container - Dependencies: E01
E04: Verify persistence of daemon.json and iptables rules across Unraid reboot
- Verifies: C04
- Setup:
- System: Unraid UM790 Pro with
/boot/config/goconfigured with startup commands - Pre-condition: E01 fix applied AND persisted in
/boot/config/go
- System: Unraid UM790 Pro with
- Procedure:
- Confirm current state: daemon.json contains
172.17.0.1DNS entry; iptables DNAT rules are active; DNS resolves fast from containers. - Inspect
/boot/config/goto confirm it contains the commands to write daemon.json and add iptables rules. - Perform a full Unraid reboot (not just Docker restart).
- After reboot, inspect
/etc/docker/daemon.json— confirm DNS entry is present. - List active iptables rules — confirm DNAT rules are present.
- From a bridge-networked container, test DNS latency — confirm ~2ms resolution.
- From a host-networked container, test that iptables DNAT routes traffic correctly.
- Confirm current state: daemon.json contains
- Metrics: daemon.json content after reboot, iptables rule presence after reboot, DNS latency after reboot
- Expected outcome:
- daemon.json retains
172.17.0.1DNS entry across reboot - iptables DNAT rules are restored by
/boot/config/goon each boot - DNS latency remains ~2ms after reboot (no regression to 8-second latency)
- daemon.json retains
- Baselines: State without
/boot/config/goentries (expected: daemon.json reset to default, iptables rules lost, DNS latency returns to ~8s) - Dependencies: E01