-
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
Set a name for the container #389
Conversation
Fixes #387 |
Will this cause problems if two instances of a task get scheduled on the same host, since Docker container names must be unique? |
I assumed that task names are unique, but looking at https://github.com/hashicorp/nomad/blob/master/jobspec/parse.go#L361 that does not seem to be the case. Will modify. |
The name should include the alloc_id which would make the name unique. Currently the drivers do not have access to the alloc_id. We will submit a PR soon to update this and then this PR can be updated. |
@achanda Why do we need to specify this at all? |
@cbednarski This is useful when people use container names with metric dimensions, so a unique name which can be traced back to a Nomad object is easier to co-relate while debugging, etc. |
@cbednarski the associated issue was asking for a name to track containers using a monitoring system. If we auto generate a name, an external agent might be able to query nomad API to get alloc id and task name and use those to monitor. |
I think we need to pass the name of the task to the driver since the name might have to include more information like restarts etc to keep the task name unique through restarts. |
Thanks @achanda |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
No description provided.