Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include old resolv.conf contents without nameservers #10731

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simonrw
Copy link
Contributor

@simonrw simonrw commented Apr 26, 2024

Motivation

A user mentioned that their DNS lookups within their Kubernetes cluster did not work with "simple" names, e.g. looking up a service by its name only - not specifying .cluster.local or .<namespace>.svc.cluster.local etc.

Changes

  • Rather than clobbering the entire /etc/resolv.conf we only update the nameservers fields, leaving the search and ndots (and others) at their original values

@simonrw simonrw added this to the Playground milestone Apr 26, 2024
@simonrw simonrw added the semver: patch Non-breaking changes which can be included in patch releases label Apr 26, 2024
@simonrw simonrw self-assigned this Apr 26, 2024
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 33m 29s ⏱️ + 3m 2s
2 922 tests ±0  2 632 ✅ ±0  290 💤 ±0  0 ❌ ±0 
2 924 runs  ±0  2 632 ✅ ±0  292 💤 ±0  0 ❌ ±0 

Results for commit 27034f5. ± Comparison against base commit fcd5927.

@simonrw simonrw marked this pull request as ready for review May 24, 2024 16:11
@simonrw simonrw force-pushed the dns/keep-resolvconf-options branch from 27034f5 to d11547e Compare May 24, 2024 16:11
@simonrw simonrw requested a review from dfangl May 24, 2024 16:12
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes, that should fix the name resolving issues!

new_contents = infile.read()

lines = new_contents.splitlines()
assert "nameserver 127.0.0.1" in lines
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an assertion that nameserver 127.0.0.11 is not in lines as well? To make sure the filtering works as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants