-
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
Allocation Addresses are derived from resources #5862
Comments
@Smithx10 The cli output reads from that field like you mention above, and is populated by the scheduler during a network assignment step, which is done when the task has a Your job spec is using the driver address mode so the address is not allocated by the scheduler and hence Resource.Networks is not populated. The address is known to the client running the alloc and is persisted to its local state, but not known to the server/scheduler. I see how the UX can be confusing though, will discuss some options internally to see what we can do to make this better. |
@preetapan I think that issue #5863 can perhaps help solve the UX. If a TaskDriver author could store a map on the allocation struct a user could see the info returned during "nomad status ". I thought that was what DriveAttributes were for but I didn't see anywhere for a user to query them. https://github.com/hashicorp/nomad/blob/master/drivers/docker/driver.go#L1173 |
@Smithx10 Discussed with the team internally and we see other parallels with upcoming work on Consul connect integration that could also use this feature (i.e exposing driver specific address details via the API). Will be addressing this when we make those changes for Consul connect integration. |
@preetapan I'd hope that these modifications to the API don't have any dependencies on a Service Mesh and are just being grouped up into a bigger pile of work. Currently The Task Driver can advertise the proper address in Consul. Glad to see the allocation API get some attention :) |
It's the same with the docker driver if someone use the network_mode != bridge (in my case a macvlan). So the UI and also the cli doesn't know anything about the used address but the service is registered within consul with the right address. So nomad basically knows about the used address inside the container but don't display this. @preetapan is this something which is addressed with 0.10.x? |
Nomad version
Nomad v0.9.1 (4b2bdbd)
Operating system and Environment details
Linux and Triton Plugin
Issue
While writing a plugin, I noticed that even though I return a *drivers.DriverNetwork in StartTask nomad status returns an empty value for addresses.
I believe this is because the address and port that are stored in the Allocation are derived from the Resources.NetworkResource type. My Driver registers the proper address and port into Consul via the following Service{} stanza.
But requires nothing to be inputed into Resources.Networks{} which I believe results in an empty value.
Job file (if appropriate)
The text was updated successfully, but these errors were encountered: