Skip to content

Commit 252f67d

Browse files
Add comments
1 parent 93fea35 commit 252f67d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,30 @@ jobs:
7373
- name: Download and verify dependencies
7474
run: make deps
7575

76+
# Before (default):
77+
# - /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
78+
# - stub-resolv.conf points to 127.0.0.53 (systemd-resolved stub listener)
79+
# - systemd-resolved forwards to the real upstream file:
80+
# /run/systemd/resolve/resolv.conf
81+
# Flow: /etc/resolv.conf -> stub-resolv.conf (127.0.0.53) -> systemd-resolved -> /run/systemd/resolve/resolv.conf
82+
#
83+
# After (bind-mount):
84+
# - /etc/resolv.conf is bind-mounted to /run/systemd/resolve/resolv.conf
85+
# - processes read upstream nameservers directly from /run/systemd/resolve/resolv.conf
86+
# Flow: /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
87+
#
88+
# This makes processes talk directly to the upstream DNS servers and
89+
# bypasses the systemd-resolved *stub listener* (127.0.0.53).
90+
#
91+
# Important nuance: systemd-resolved itself is NOT stopped; it still runs and updates
92+
# /run/systemd/resolve/resolv.conf. Because this is a bind (not a copy), updates to the
93+
# upstream list are visible. Trade-off: you lose the stub’s features (caching,
94+
# split-DNS/VPN per-interface behavior, DNSSEC/DoT/DoH mediation, mDNS/LLMNR).
95+
#
96+
# Reason: network namespaces have their own network stack (interfaces, routes and loopback).
97+
# A process inside a network namespace resolves 127.0.0.53 against that namespace’s loopback, not the host’s,
98+
# and systemd-resolved usually listens on the host loopback. As a result the stub at 127.0.0.53 is often
99+
# unreachable from an isolated namespace and DNS lookups fail. Bind-mounting /run/systemd/resolve/resolv.conf over /etc/resolv.conf forces processes to use the upstream nameservers directly, avoiding that failure.
76100
- name: Change DNS configuration
77101
if: runner.os == 'Linux'
78102
run: sudo mount --bind /run/systemd/resolve/resolv.conf /etc/resolv.conf

0 commit comments

Comments
 (0)