[ 
https://issues.apache.org/jira/browse/MESOS-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215633#comment-14215633
 ] 

Timothy Chen commented on MESOS-2016:
-------------------------------------

I agree the mesos- is a bit too generic, but also after thinking about this 
more I don't think we can simply put the slave id in the name.

At first glance it seems very nice to put the slave id so we can allow multiple 
slave running on the same host sharing the same docker daemon, but at recover 
time unless the slave checkpointed I no longer know what containers are from 
the old slave that was killed or actually from another slave that is running. 
Therefore I might leave containers running forever even after recover 
incorrectly.

I think the only best thing I can think of now is to just change the prefix 
from mesos- to something else that is less likely to clash with other people's 
names, maybe something like "mesos-launched-" ? What do you think?

> docker_name_prefix is too generic
> ---------------------------------
>
>                 Key: MESOS-2016
>                 URL: https://issues.apache.org/jira/browse/MESOS-2016
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Jay Buffington
>            Assignee: Timothy Chen
>
> From docker.hpp and docker.cpp:
> {quote}
>     // Prefix used to name Docker containers in order to distinguish those
>     // created by Mesos from those created manually.
>     extern std::string DOCKER_NAME_PREFIX;
>     // TODO(benh): At some point to run multiple slaves we'll need to make
>     // the Docker container name creation include the slave ID.
>     string DOCKER_NAME_PREFIX = "mesos-";
> {quote}
> This name is too generic.  A common pattern in docker land is to run 
> everything in a container and use volume mounts to share sockets do RPC 
> between containers.  CoreOS has popularized this technique. 
> Inevitably, what people do is start a container named "mesos-slave" which 
> runs the docker containerizer recovery code which removes all containers that 
> start with "mesos-"  And then ask "huh, why did my mesos-slave docker 
> container die? I don't see any error messages..."
> Ideally, we should do what Ben suggested and add the slave id to the name 
> prefix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to