how to get docker container id?

2015-06-12 Thread Olivier Sallou
Hi,
how can we get the container id when executing a TaskInfo with a  Docker
ContainerInfo ?

Mesos execute a Docker container with name mesos-xxx but how can we get
this identifier ?

I set in my TaskInfo a unique id in Task Id, but itis not used as Docker
identifier.

I need it to query cAdvisor, running on my nodes.

Thanks

Olivier

-- 


gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



Re: how to get docker container id?

2015-06-12 Thread Olivier Sallou


On 06/12/2015 12:02 PM, Adam Bordelon wrote:
 You can query the slave's state.json to get the container ID.
 See the previous thread:
 http://search-hadoop.com/m/0Vlr6OtCiO1p8ypc2/mesos+accessing+programmatticallysubj=Re+Accessing+stdout+stderr+of+a+task+programmattically+
Thanks, I could get it, but it would be nice to get the information in
update message rather than needing to trigger the nodes (with
information for all tasks).

Olivier

 On Fri, Jun 12, 2015 at 2:35 AM, Olivier Sallou olivier.sal...@irisa.fr
 wrote:

 Hi,
 how can we get the container id when executing a TaskInfo with a  Docker
 ContainerInfo ?

 Mesos execute a Docker container with name mesos-xxx but how can we get
 this identifier ?

 I set in my TaskInfo a unique id in Task Id, but itis not used as Docker
 identifier.

 I need it to query cAdvisor, running on my nodes.

 Thanks

 Olivier

 --


 gpg key id: 4096R/326D8438  (keyring.debian.org)
 Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



-- 
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



Re: how to get docker container id?

2015-06-12 Thread Adam Bordelon
You can query the slave's state.json to get the container ID.
See the previous thread:
http://search-hadoop.com/m/0Vlr6OtCiO1p8ypc2/mesos+accessing+programmatticallysubj=Re+Accessing+stdout+stderr+of+a+task+programmattically+

On Fri, Jun 12, 2015 at 2:35 AM, Olivier Sallou olivier.sal...@irisa.fr
wrote:

 Hi,
 how can we get the container id when executing a TaskInfo with a  Docker
 ContainerInfo ?

 Mesos execute a Docker container with name mesos-xxx but how can we get
 this identifier ?

 I set in my TaskInfo a unique id in Task Id, but itis not used as Docker
 identifier.

 I need it to query cAdvisor, running on my nodes.

 Thanks

 Olivier

 --


 gpg key id: 4096R/326D8438  (keyring.debian.org)
 Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438




Re: how to get docker container id?

2015-06-12 Thread Timothy Chen
Hi Oliver,

With latest master and next 0.23 release we've added docker inspect output in 
the first task running status update data field.

Therefore from the scheduler you can read and parse as json, and find all the 
information you need about the container including name and id.

Tim

 On Jun 12, 2015, at 6:04 AM, Olivier Sallou olivier.sal...@irisa.fr wrote:
 
 
 
 On 06/12/2015 12:02 PM, Adam Bordelon wrote:
 You can query the slave's state.json to get the container ID.
 See the previous thread:
 http://search-hadoop.com/m/0Vlr6OtCiO1p8ypc2/mesos+accessing+programmatticallysubj=Re+Accessing+stdout+stderr+of+a+task+programmattically+
 Thanks, I could get it, but it would be nice to get the information in
 update message rather than needing to trigger the nodes (with
 information for all tasks).
 
 Olivier
 
 On Fri, Jun 12, 2015 at 2:35 AM, Olivier Sallou olivier.sal...@irisa.fr
 wrote:
 
 Hi,
 how can we get the container id when executing a TaskInfo with a  Docker
 ContainerInfo ?
 
 Mesos execute a Docker container with name mesos-xxx but how can we get
 this identifier ?
 
 I set in my TaskInfo a unique id in Task Id, but itis not used as Docker
 identifier.
 
 I need it to query cAdvisor, running on my nodes.
 
 Thanks
 
 Olivier
 
 --
 
 
 gpg key id: 4096R/326D8438  (keyring.debian.org)
 Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
 
 -- 
 Olivier Sallou
 IRISA / University of Rennes 1
 Campus de Beaulieu, 35000 RENNES - FRANCE
 Tel: 02.99.84.71.95
 
 gpg key id: 4096R/326D8438  (keyring.debian.org)
 Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438