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 execution environment missing PORT/IP variables from other tasks #2491

Closed
robothor opened this issue Mar 28, 2017 · 3 comments
Closed

Comments

@robothor
Copy link

Nomad version

Nomad v0.5.5

Operating system and Environment details

Ubuntu 14.04.4 LTS

Issue

Not all task ports are exposed to all tasks. I have three tasks in this example. Two tasks expose multiple ports (port "yours" {} and port "mine" {} from one and ports "one", "two", "three" from another) .

However, when from the environment of the third task, only the last port/ip is visible:

(from /usr/bin/env)

NOMAD_ADDR_mtl_example_three=10.45.10.151:59824
NOMAD_ADDR_mtl_sleep_mine=10.45.10.151:41048
NOMAD_ALLOC_DIR=/alloc
NOMAD_ALLOC_ID=10b3fbdb-44a4-fa00-468b-cf37dc715a42
NOMAD_ALLOC_INDEX=0
NOMAD_ALLOC_NAME=mtl-example.mtl-test[0]
NOMAD_CPU_LIMIT=100
NOMAD_IP_mtl_example_three=10.45.10.151
NOMAD_IP_mtl_sleep_mine=10.45.10.151
NOMAD_JOB_NAME=mtl-example
NOMAD_MEMORY_LIMIT=100
NOMAD_PORT_mtl_example_three=59824
NOMAD_PORT_mtl_sleep_mine=41048
NOMAD_SECRETS_DIR=/secrets
NOMAD_TASK_DIR=/local
NOMAD_TASK_NAME=mtl-env

Reproduction steps

If I run the attached job, all three tasks start. (https://gist.github.com/robothor/611a2b54d9a5a5294b215f39a44671e4)

Running nomad logs 10b3fbdb mtl-env | grep NOMAD | sort -u

produces the above output showing the environment in the third task.

I expect to see

NOMAD_PORT_mtl_example_one=XXXXX
NOMAD_PORT_mtl_example_two=YYYYY
NOMAD_PORT_mtl_example_three=59824
NOMAD_PORT_mtl_sleep_yours=ZZZZZ
NOMAD_PORT_mtl_sleep_mine=41048

I also expect to see the corresponding NOMAD_ADDR and NOMAD_IP variables.

Job file (if appropriate)

https://gist.github.com/robothor/9b6b0770287ecf1255ed4553e6dd87f1

@dadgar
Copy link
Contributor

dadgar commented Mar 28, 2017

Reproduced! Thanks will get it fixed

@robothor
Copy link
Author

Thanks!

@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 Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants