-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dns_search_domain not applied when using bridge network mode #11239
Comments
Thanks for the report @jhaezebr. I wonder if this is related to #11033, more specifically the last item:
Could you try changing your host DNS configuration to see if it solves your problem? |
@lgfa29 I'm not sure if this was what you were asking, but it works when i add the following to the job configs:
output
job filesbridge.nomad
nonbridge.nomad
|
Using the servers options the containers both contain the resolv.conf search option from the host
resolv.conf in both of the containers:
So it seems that it is indeed the same problem? |
Hi @jhaezebr and thanks for raising this. I've taken a look into this today and wanted to share some my findings for you and other readers. I firstly confirmed that just using vanilla Docker results in an expected resolv.conf file:
When running your example which uses bridge networking and inspecting the
The Nomad job specification allows for setting of DNS configuration via the network stanza. Utilising this in the job specification included below, results in the desired
I will discuss this internally and would be interested in your feedback on the approach; but I feel using the |
Hi @jrasell , In any case, I'd like to thank you and @lgfa29 for the help on this problem. |
Doc fix in #12229 |
Nomad version
Nomad v1.1.5 (117a23d)
Operating system and Environment details
Vagrant with ubuntu/focal64
CNI bridge plugin v1.0.1
Consul v1.9.4, Revision 10bb6cb3b
Issue
When running a job using the bridge network mode, the dns_search_domains parameter is not applied.
Reproduction steps
Run nomad and consul as root, both in dev mode
Use bind to redirect DNS to consul
Expected Result
Actual Result
Job file (if appropriate)
Bridged job:
Non bridged job:
Nomad logs
Click to expand
The text was updated successfully, but these errors were encountered: