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

Fix network.dns interpolation #12817

Merged
merged 4 commits into from May 17, 2022
Merged

Fix network.dns interpolation #12817

merged 4 commits into from May 17, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 28, 2022

This fixes #12780

When #12021 was introduced, it doesn't actually work for the group -> network -> dns stanza. This PR finishes the work to get network.dns interpolation working, by actually using the interpolated DNS values.

@ghost ghost changed the title Quick and dirty hack to get interpolated dns values working Fix network.dns interpolation Apr 28, 2022
@ghost ghost marked this pull request as ready for review April 28, 2022 23:18
@@ -1041,10 +1041,11 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
if alloc.AllocatedResources != nil && len(alloc.AllocatedResources.Shared.Networks) > 0 {
allocDNS := alloc.AllocatedResources.Shared.Networks[0].DNS
if allocDNS != nil {
interpolatedNetworks := taskenv.InterpolateNetworks(env, alloc.AllocatedResources.Shared.Networks)
Copy link
Author

Choose a reason for hiding this comment

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

My suspicion is that there should be a better place to put this (ie this should probably be in a hook file), but this does have the value of actually working

@shoenig shoenig added backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line labels May 17, 2022
@shoenig shoenig added this to the 1.4.0 milestone May 17, 2022
@shoenig shoenig merged commit 88e8c22 into hashicorp:main May 17, 2022
ghost pushed a commit to grapl-security/grapl that referenced this pull request Aug 18, 2022
Now that hashicorp/nomad#12817 is merged in as
of Nomad 1.3.2, we should stop using the hax to get the host IP and
instead use Nomad's native method to get the host IP.
@github-actions
Copy link

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 Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line
Projects
Development

Successfully merging this pull request may close these issues.

Network.dns variable interpolation does not actually work
1 participant