Disable DHCP-provided DNS on VM passt NIC#60
Merged
Merged
Conversation
passt injects additional DNS servers (169.254.1.1, host gateway) via DHCP that don't know about cluster.local. systemd-resolved may query these before the bink DNS container and accept an NXDOMAIN, causing flaky registry.cluster.local resolution on worker nodes. Setting ipv4.ignore-auto-dns prevents DHCP DNS from being added to the link, leaving only the bink DNS container which forwards non-cluster queries to upstream (8.8.8.8, 8.8.4.4). Fixes: #59 Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Alice Frosi <afrosi@redhat.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigures the VM passt NIC NetworkManager connection to stop using DHCP-provided DNS and rely solely on the cluster DNS, by extending the existing nmcli modification command. Flow diagram for updated DNS resolution path on passt NICflowchart LR
A[Worker_node systemd-resolved
query registry.cluster.local]
B[NetworkManager connection cloud-init_enp2s0
ipv4.ignore-auto-dns yes]
C[bink_DNS_container
cluster DNS]
A --> B
B --> C
C --> D[Upstream DNS 8.8.8.8 / 8.8.4.4
for non-cluster domains]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="internal/node/templates/user-data.yaml.tmpl" line_range="84" />
<code_context>
- systemctl enable --now ostree-state-overlay@opt.service
- systemctl enable --now qemu-guest-agent
- - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}"
+ - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" ipv4.ignore-auto-dns yes
- nmcli connection up "cloud-init enp2s0"
- systemctl enable --now crio
</code_context>
<issue_to_address>
**suggestion:** Consider whether IPv6 DNS auto-configuration should also be disabled for consistency.
Right now only IPv4 auto DNS is disabled via `ipv4.ignore-auto-dns yes`. In dual-stack setups (DNS via IPv6 RA/DHCPv6), this could lead to inconsistent DNS behavior between IPv4 and IPv6. Please decide explicitly whether `ipv6.ignore-auto-dns` should match this setting to avoid subtle interface-specific DNS differences.
```suggestion
- nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" ipv4.ignore-auto-dns yes ipv6.ignore-auto-dns yes
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - systemctl enable --now ostree-state-overlay@opt.service | ||
| - systemctl enable --now qemu-guest-agent | ||
| - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" | ||
| - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" ipv4.ignore-auto-dns yes |
There was a problem hiding this comment.
suggestion: Consider whether IPv6 DNS auto-configuration should also be disabled for consistency.
Right now only IPv4 auto DNS is disabled via ipv4.ignore-auto-dns yes. In dual-stack setups (DNS via IPv6 RA/DHCPv6), this could lead to inconsistent DNS behavior between IPv4 and IPv6. Please decide explicitly whether ipv6.ignore-auto-dns should match this setting to avoid subtle interface-specific DNS differences.
Suggested change
| - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" ipv4.ignore-auto-dns yes | |
| - nmcli connection modify "cloud-init enp2s0" ipv4.dns-search "~{{.ClusterDomain}} {{.ClusterDomain}}" ipv4.ignore-auto-dns yes ipv6.ignore-auto-dns yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
passt injects additional DNS servers (169.254.1.1, host gateway) via DHCP that don't know about cluster.local. systemd-resolved may query these before the bink DNS container and accept an NXDOMAIN, causing flaky registry.cluster.local resolution on worker nodes.
Setting ipv4.ignore-auto-dns prevents DHCP DNS from being added to the link, leaving only the bink DNS container which forwards non-cluster queries to upstream (8.8.8.8, 8.8.4.4).
Fixes: #59
Summary by Sourcery
Bug Fixes: