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

docker: use Nomad managed resolv.conf when DNS options are set #8600

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

nickethier
Copy link
Member

When network DNS configuration was initially added, the implementation plumbed the config into the docker driver's DNS related field. This caused issues when using bridge or cni Nomad networking modes as docker will fail to create the container because these DNS options cannot be set when using a non-default network mode. In this case Nomad's bridge networking mode sets the docker network mode to container.

This PR fixes this issue by reusing logic in exec and other drivers to manage the DNS configuration and mount it into the task. This way Nomad generates the resolv.conf file and mounts it into the task automatically.

fixes #8431

Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM!

@baxor
Copy link

baxor commented Jan 14, 2022

Did this fix make it into the enterprise release? We are currently hitting this error (failed to create container: API error (400): conflicting options: dns and the network mode) with dns_servers and dns_search_domain set at the task level while testing consul connect/sidecar proxy. Running 1.1.9+ent

@tgross
Copy link
Member

tgross commented Jan 14, 2022

@baxor yes, that'd be in enterprise as well. Can you open a new issue describing the problem you've got? Thanks.

@baxor
Copy link

baxor commented Jan 14, 2022

DNS configuration and mount it into the task. This way Nomad generates the resolv.conf file and mounts it into the task autom

Thanks, I opened #11857 -- happy to provide any further details.

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nomad fails to run job if using network mode bridge and dns options
5 participants