You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Timothy Chen (JIRA)" <ji...@apache.org> on 2014/08/21 01:13:36 UTC
[jira] [Commented] (MESOS-1726) docker containerizer fails when
container exits quickly
[ https://issues.apache.org/jira/browse/MESOS-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14104775#comment-14104775 ]
Timothy Chen commented on MESOS-1726:
-------------------------------------
So you're launching a docker container as an Executor instead of Task (with just setting ExecutorInfo in your TaskInfo).
We expect the Executor to keep running as it needs to receive the Task afterwards, so if it doesn't even live long enough to get the pid then we throw a failure. I think we're doing the correct thing here. Let me know if you think otherwise.
> docker containerizer fails when container exits quickly
> -------------------------------------------------------
>
> Key: MESOS-1726
> URL: https://issues.apache.org/jira/browse/MESOS-1726
> Project: Mesos
> Issue Type: Bug
> Components: containerization
> Reporter: Jay Buffington
>
> There is a race condition in the docker containerizer code that can usually be reproduced by running a command that exits quickly (for example, true) inside of a docker container. You will see the error "Unable to get executor pid after launch” in the logs and the master will get a {{TASK_LOST}}.
> This race is between "docker inspect” and the process running inside the container. When the processes inside the container exits (successful or not) before docker inspect runs docker inspect will return a Pid of 0. When the pid is zero the {{Docker::Container::create}} method will set the pid to an empty {{Option<pid_t>}}. This will cause the {{____launch}} method to return a {{Failure()}}.
--
This message was sent by Atlassian JIRA
(v6.2#6252)