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

[NETDOG] Fixes #1645 : make dns_search a Vec to avoid comma separated search domains in resolv.conf file. #1646

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

hypnoce
Copy link

@hypnoce hypnoce commented Jul 2, 2021

Issue number:
1645

Description of changes:
In netdog, make dns_search a Vec

Testing done:
Yes locally. The resolv.conf file is now valid.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

…comma separated search domains in resolv.conf file.
@tjkirch tjkirch linked an issue Jul 2, 2021 that may be closed by this pull request
Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

I tested and confirmed the results; this does fix the search line for multiple domains separated with spaces, so I'm happy.

There's a related (non-blocking) issue to consider that I haven't quite figured out yet. The VPC console is purposely vague about the format of the domain name (search) field because different operating systems treat it differently; it's more specific about the domain name server line, in saying that they must be comma-separated. For someone not familiar with resolv.conf, I think it'd be reasonable to enter the domain name values with comma separation as well, to fit the pattern. However, that doesn't work as-is; we wind up with no search line in resolv.conf. In fact, wicked doesn't even write the value to the file it hands netdog, so it wouldn't be as easy a fix. I'm not sure if there's a nice way around that, but maybe someone will have an idea :)

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🎉

Thanks for the PR!

@tjkirch
Copy link
Contributor

tjkirch commented Jul 6, 2021

we wind up with no search line in resolv.conf. In fact, wicked doesn't even write the value to the file it hands netdog

wicked doesn't show the value in its lease XML file, either. Also confirmed that with , (space, comma, space) between values it gives the same result, just in case parsing was being picky about values within each domain string. This was a minor concern and we have a working answer for the main use case in this PR, so I'll merge now. :)

@tjkirch tjkirch merged commit a9a99c6 into bottlerocket-os:develop Jul 6, 2021
@hypnoce
Copy link
Author

hypnoce commented Jul 7, 2021

It was almost the 1000th PR
image
I'm sad :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resolv.conf search invalid
4 participants