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

NOMAD_PORT_<label> regression #6251

Merged
merged 2 commits into from
Sep 4, 2019
Merged

NOMAD_PORT_<label> regression #6251

merged 2 commits into from
Sep 4, 2019

Conversation

jazzyfresh
Copy link
Contributor

@jazzyfresh jazzyfresh commented Sep 3, 2019

for #6159

Behavior

  • In 0.8.*, we set the port mapping in the task's environment variables.
    Screenshot from 2019-09-03 13-04-10
  • In 0.9.0, we do not override the port environment variables with the port map, so NOMAD_HOST_PORT_<label> and NOMAD_PORT_<label> are the same.
    Screenshot from 2019-09-03 13-06-03
  • In this fix, NOMAD_PORT_<label> gets set to the correct value from the port mapping, so the behavior matches 0.8.*

Todo

  • docker driver
  • rkt driver
  • qemu driver
  • tests

The rkt driver in 0.8 wasn't setting port maps correctly, as it didn't implement Prestart driver config part [1]; see qemu[2] implementation for comparison

[1] https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/rkt.go#L396-L398
[2] https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/qemu.go#L186-L205

@jazzyfresh jazzyfresh added this to the 0.10.0 milestone Sep 3, 2019
@notnoop notnoop force-pushed the b-port-map-regression branch from dff556a to 2e016bd Compare September 4, 2019 13:54
@notnoop notnoop requested a review from schmichael September 4, 2019 15:22
@notnoop notnoop marked this pull request as ready for review September 4, 2019 15:22
@notnoop notnoop force-pushed the b-port-map-regression branch from 2e016bd to bd6bbc9 Compare September 4, 2019 15:28
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

🎉

@notnoop notnoop merged commit 0d9fca8 into master Sep 4, 2019
@notnoop notnoop deleted the b-port-map-regression branch September 4, 2019 15:54
notnoop pushed a commit that referenced this pull request Sep 18, 2019
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

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 Feb 1, 2023
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.

3 participants