-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Changing the default host_network is broken in 1.7.2 #19726
Comments
Hi @SamMousa! This smells a little bit like #18097 which we fixed in #18096, but it's not quite the same thing. I could use a couple clarifications to help narrow it down:
client {
enabled = true
servers = ["127.0.0.1"]
host_network "default" {
cidr = "192.168.40.0/24"
reserved_ports = "4646-4648"
}
host_network "public" {
interface = "enp7s0"
}
} |
Yes, I worked in (i think) 1.6.x. The local subnet is a vlan, so it is technically the same interface. But with a postfix. Something like |
However it all works when I just name the network (in nomad agent config) something else than default, so I'm thinking it shouldn't be related to selection logic. |
I have the same issue on This is quite a problem, since I now need to adjust all jobs so they don't use the default network. |
To fix this, one needs to change network_interface to the "default" interface one wants services to use if they don't specify a specific
Note: This does not affect outgoing connections. |
Nomad version
v1.7.2
Operating system and Environment details
Ubuntu 22.04.3 LTC
Issue
We have a tiny cluster of 3 nodes running both the client and the server.
There's a private network on a VLAN, which we configured as the host network
default
.Each server also has a public IP which we configured as a host network called
public
.In the configuration below I duplicated the config for the private network and named the copy
private
. This actually solves the problem, so it should also give an indication of where the issue is coming from. (Isdefault
a special name perhaps?)Reproduction steps
Use the above or similar configuration and try to expose a port on the host_network "default", note that it will get exposed on the public network instead.
Edit: note that our cluster runs several jobs with similar config and I'm not seeing this issue for all of them. (This could be because the others have not changed yet and they might therefore breaking when they get rescheduled or something)
Expected Result
It should work, or if changing the host network with name default is no longer supported it should crash hard instead of silently do the wrong thing.
Actual Result
It exposes the port(s) on the wrong network.
Job file (if appropriate)
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
The text was updated successfully, but these errors were encountered: