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

interpolate network.dns block on client #11851

Closed
tgross opened this issue Jan 14, 2022 · 2 comments · Fixed by #12021
Closed

interpolate network.dns block on client #11851

tgross opened this issue Jan 14, 2022 · 2 comments · Fixed by #12021
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking type/enhancement
Milestone

Comments

@tgross
Copy link
Member

tgross commented Jan 14, 2022

From #11845 (comment) @nvx requested being able to interpolate the network.dns.servers field with node metadata. We likely don't interpolate the network block because we need it to be complete for scheduling, but the dns block defaults to the client if unset, so it should be safe to interpolate after landing on the client.

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jan 14, 2022
@tgross tgross moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Jan 14, 2022
@tgross tgross moved this from In Progress to Needs Roadmapping in Nomad - Community Issues Triage Jan 14, 2022
@tgross tgross added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Jan 14, 2022
nvx added a commit to nvx/nomad that referenced this issue Feb 8, 2022
Nomad - Community Issues Triage automation moved this from Needs Roadmapping to Done Feb 16, 2022
@tgross tgross added this to the 1.3.0 milestone Feb 16, 2022
@tgross
Copy link
Member Author

tgross commented Feb 16, 2022

#12021 has been merged and will ship in 1.3.0

ghost pushed a commit to grapl-security/grapl that referenced this issue Apr 10, 2022
With the move of dnsmasq to the host, we now need a way to tell the
containers to use the host for their dns lookups if they want to use
consul dns. Typically on a host you would just add a nameserver for
127.0.0.1, but that doesn't work because in the container 127.0.0.1
points to the container not the host.
Ideally we'd just be passing in attr.unique.network.ip-address,
but unfortunately, variable interpolation is only available for network.dns
as of Nomad 1.3 per hashicorp/nomad#11851
So instead we're stuck doing grabbing an IP from `hostname -I` and
passing that in as an environment variable. This may actually be
for the best if we end up setting a distinct dns service in production
inickles-grapl pushed a commit to grapl-security/grapl that referenced this issue Apr 20, 2022
With the move of dnsmasq to the host, we now need a way to tell the
containers to use the host for their dns lookups if they want to use
consul dns. Typically on a host you would just add a nameserver for
127.0.0.1, but that doesn't work because in the container 127.0.0.1
points to the container not the host.
Ideally we'd just be passing in attr.unique.network.ip-address,
but unfortunately, variable interpolation is only available for network.dns
as of Nomad 1.3 per hashicorp/nomad#11851
So instead we're stuck doing grabbing an IP from `hostname -I` and
passing that in as an environment variable. This may actually be
for the best if we end up setting a distinct dns service in production
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking type/enhancement
Projects
Development

Successfully merging a pull request may close this issue.

1 participant