-
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
[question] Query Container ID #4848
Comments
@sevagh thanks for the suggestion. This isn't something we are actively working on, but will consider adding it to a future roadmap with a more generic way to surface allocation metadata. The upcoming 0.9 release will add support for passing allocid/taskid etc to docker as docker labels. #4781 tracks this. |
Thanks @preetapan - so that means instead of manually specifying |
I've opened up this, #5863 trying to do the same for my users. While exploring the code, I'm curious if DriverAttributes in the TaskStatus struct could be used for this? Or what they are used for.... I can't figure it out, or What NetworkOverride does. It is returned Nomad calls "func (d Driver) InspectTask(taskID string) (drivers.TaskStatus, error)" but I cant figure out when Nomad calls that function either. Hopefully someone can help educate me :) :) type TaskStatus struct { |
Anyone curious about this... we currently are getting around this by using the event.Eventer and then leaving it up to the consumer of /allocations to pull the latest information if they want. Not sure if Docker does this or not but it wouldn't break anything to add this. |
I'm looking for a way to associate running containers to an alloc id. This is for general debugging, or for example to use tools like https://github.com/google/cadvisor
I experimented with the label solution, where I add this to my HCL:
Also, the container name seems to contain the alloc id in it, e.g.
${task-name}-${nomad_alloc_id}
in the output ofdocker ps
.I'm sure the ContainerID is kept track of in the code - is there a way to print this information from
nomad alloc-status
? Ornomad node status
?Is that useful? e.g.
nomad alloc-status ${alloc-id}
to print the actual container ID (if it's using the Docker driver).The text was updated successfully, but these errors were encountered: