Skip to content

Commit 9ba1c93

Browse files
committed
Add networking debug checks to nixos test
Check network-online.target, ping external IPs (1.1.1.1 and 9.9.9.9), and inspect resolv.conf and systemd-resolved status to diagnose why DNS resolution is failing in the test VM.
1 parent 2b47444 commit 9ba1c93

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/nixos/integration.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ pkgs.testers.nixosTest {
4444
import json
4545
4646
control.start()
47+
48+
# Debug: Check if networking is available
49+
with control.nested("check networking"):
50+
control.wait_for_unit("network-online.target", timeout=30)
51+
control.succeed("ping -c 1 1.1.1.1 || ping -c 1 9.9.9.9 || echo 'WARNING: No external ping response'")
52+
control.succeed("cat /etc/resolv.conf || echo 'No resolv.conf'")
53+
control.succeed("systemctl status systemd-resolved || echo 'systemd-resolved not active'")
54+
4755
control.wait_for_unit("containerd.service")
4856
4957
# ── Phase 1: Bootstrap kubeadm cluster ──────────────────────────────

0 commit comments

Comments
 (0)