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

Timothy Chen commented on MESOS-3688:
-------------------------------------

One problem of just getting the container id, is that Mesos doesn't gurantee 
the naming of the container to be the same across all versions. We started with 
mesos-[containerId] but actually moved to mesos-[siaveId]/[containerId].

One reliable way to get all information about the docker container, is actually 
just read the Docker inspect JSON output that's part of the TaskStatus 
(TASK_RUNNING) update in the message field, and you can find the name of the 
container in there.

> Get Container Name information when launching a container task
> --------------------------------------------------------------
>
>                 Key: MESOS-3688
>                 URL: https://issues.apache.org/jira/browse/MESOS-3688
>             Project: Mesos
>          Issue Type: Improvement
>          Components: containerization
>    Affects Versions: 0.24.1
>            Reporter: Raffaele Di Fazio
>            Assignee: Kapil Arya
>              Labels: mesosphere
>
> We want to get the Docker Name (or Docker ID, or both) when launching a 
> container task with mesos. The container name is generated by mesos itself 
> (i.e. mesos-77e5fde6-83e7-4618-a2dd-d5b10f2b4d25, obtained with "docker ps") 
> and it would be nice to expose this information to frameworks so that this 
> information can be used, for example by Marathon to give this information to 
> users via a REST API. 
> To go a bit in depth with our use case, we have files created by fluentd 
> logdriver that are named with Docker Name or Docker ID (full or short) and we 
> need a mapping for the users of the REST API and thus the first step is to 
> make this information available from mesos. 



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

Reply via email to