-
Notifications
You must be signed in to change notification settings - Fork 2k
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
address_mode = driver & ${NOMAD_IP_myservice} not working as expected. #11216
Comments
Hi @james-masson, Thanks for using Nomad! Could you try setting Thanks! @DerekStrickland and the Nomad Team |
Thanks @DerekStrickland - but this doesn't seem to play well with named docker networks. eg.
I presume I'd have to swich to CNI before this worked? |
Yes, that or bridge. It should support either bridge or cni. |
Hi @james-masson, Just wanted to follow up and see if a CNI switch is an option for you.
|
Hi, thanks for following up... While it is a technical solution, it involves changing a lot of existing applications and servers in Production. Logistically, it's a couple of months worth of work to get there, and while valuable in itself - it's not really a solution to the immediate problem. |
I understand. Would you mind posting your actual config files here without any secrets removed so I can replicate and see if there is anything that comes to mind? |
Difficult - air-gapped environmnent - but here's a more fully formed but untested job def.
|
Can you also share your config file where you define |
Hi @james-masson! I wanted to follow-up on this issue... It looks like you're using a userspace networking plugin for Docker here, right? But you have a Can you explain in a bit more detail how your networking is configured here? If we knew a bit more about what you're doing that'll help us give you some workarounds. Also, btw it doesn't looks like the |
This has been open for a while waiting on response, so I'm going to close it out. Please feel free to reopen if you have more info. |
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. |
Nomad version
v1.1.0
Operating system and Environment details
Debian 10 or RHEL 7
Issue
Variable interpolation around IPs/networks are broken with service using
address_mode = "driver"
eg.
${NOMAD_IP_myservice}
report the IP of the host, rather than the IP of the container.This seems related to similar fixed bugs like #8615
What I'm looking for is the ability to use the container IP as a var somewhere else in the Job definition - in this case in Consul service tags.
Reproduction steps
Create a docker service with
address_mode = "driver"
, and a static network def "myservice"Try to use
${NOMAD_IP_myservice}
Expected Result
the container IP is provided
Actual Result
the Nomad host IP is provided.
The text was updated successfully, but these errors were encountered: