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

Marcel Neuhausler commented on MESOS-2191:
------------------------------------------

Trying to answer your questions in reverse order:
4. Why is the internal mesos container id sufficient?
I need to correlate the mesos "task id" with the container-name in Docker.  
"mesos-" + mesos container id == name of container in Docker. That name becomes 
visible to the user if you run cAdvisor for example on your mesos slaves. 
Obviously it would be even nicer if Mesos would return the full container-name. 

3. As it is in the code, there's one Container per Executor, so you could 
theoretically use the ExecutorID for the correlation you mention. Why is that 
not enough?
It is my understanding that the ExecutorId is equal to the TaskId, so that 
wouldn't help in figuring out what the corresponding container name in Docker 
would be.

2. Are you attempting to extract, ultimately the docker container ID? If so, 
how would you do it?
No, I want to get the name of the container in docker

1. What exactly is your goal, i.e. If you had the mesos Container ID how would 
you use it?
We have two use-cases in which our own Mesos Framework needs to know about the 
container name in Docker:
a) We use cAdvisor to automatically collect metrics from running docker 
containers. The "collector" process talks to our Framework to get the container 
name for a corresponding mesos task.
c) Networking with Project Calico: When you set up a network-group in Calico 
you have to pass the Docker container name to Calico. Our Framework interacts 
with Calico and has to be able to correlate the Mesos TaskID with the Docker 
container name.

In general, I still have a hard time to understand why you try to "hide" some 
Mesos id even so that id gets visible to the user, for example in cAdvisor as 
part of the docker container name. I also would expect that for completeness 
reasons you would return all of the IDs in the "Task message" protobuf 
data-structure (messages.proto).. btw, ideally you would return the full 
container-name (mesos-683fd6a3-9dbc-4180-bb64-bf8b961cc50e) in the task message.



> Add ContainerId to the TaskStatus message
> -----------------------------------------
>
>                 Key: MESOS-2191
>                 URL: https://issues.apache.org/jira/browse/MESOS-2191
>             Project: Mesos
>          Issue Type: Wish
>          Components: containerization
>            Reporter: Marcel Neuhausler
>            Assignee: Alexander Rojas
>              Labels: mesosphere
>
> {{TaskStatus}} provides the frameworks with certain information 
> ({{executorId}}, {{slaveId}}, etc.) which is useful when collecting 
> statistics about cluster performance; however, it is difficult to associate 
> tasks to the container it is executed since this information stays always 
> within mesos itself. Therefore it would be good to provide the framework 
> scheduler with this information, adding a new field in the {{TaskStatus}} 
> message.
> See comments for a use case.



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

Reply via email to