You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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
The text was updated successfully, but these errors were encountered: