-
Notifications
You must be signed in to change notification settings - Fork 327
waypoint install
on nomad service discovery problems
#2314
Comments
This is sort of a nomad installation issue. While we setup the context with the allocation IP, there isn't a lot of other options. If someone is using nomad in production, they'll have to setup the waypoint context with a more stable identifier. Perhaps we need to just output a message about this fact during the |
I'm a bit hesitant to ask users to manually modify their context file after a server install, and I also suspect that the Another quick-and-dirty option: Now that we have #2328 merged, nomad users could create a persistent address somehow (consul, clever DNS, etc) before the install, and then use
I don't really like that idea either. |
Neat idea from @krantzinator - it might be possible to do a |
A simple "fix" is to emit a warning on |
This was fixed by introducing Consul DNS to the |
Describe the bug
Currently, when installing waypoint on nomad with
waypoint server install -platform=nomad
, the local waypoint CLI schedules a waypoint server nomad job, gets the resultant allocation's ip:port, and uses that as the waypoint server address for the new context. There are a few problems with this:1: If nomad ever schedules a new allocation for the job (for example when a nomad client is drained for maintenance), the new allocation will have a new IP, and all existing contexts will break.
2: It isn't possible to set the allocation IP - it's automatically determined based on the IP of the host (at least with the network settings we've tried). This means that if a user is running Nomad on a typical ec2 instance with only a private IP configured in the network interface inside the VM, the allocation will always have a private ip and won't be reachable from the internet. This might be OK for users extending their VPC to developer laptops with a VPN, but isn't an assumption I think we should make.
Steps to Reproduce
Steps to reproduce the behavior.
We discovered this testing with nomad on ec2. To reproduce:
NOMAD_ADDR=<ec2-ip>:4646 waypoint server install -platform=nomad -accept-tos
172.31.1.9:9701
(a private ip) to be reachable, but this is the private IP of the ec2 instance and will never work.Expected behavior
Installing on nomad should be possible on ec2 nomad clusters without assuming a VPN, and should be resilient to allocation changes.
Options
One option may be to auto-detect if consul is available, and if so create a consul service for our waypoint server. I'm not sure what percentage of nomad users also run consul, but I expect it's quite high.
The Nomad team may introduce some lightweight service discovery that we could use, but it isn't present today.
Waypoint Platform Versions
Additional version and platform information to help triage the issue if
applicable:
The text was updated successfully, but these errors were encountered: