[
https://issues.apache.org/jira/browse/YARN-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hong Zhiguo updated YARN-4016:
------------------------------
Description:
The docker_container_executor_session.sh is generated like below:
{code}
### get the pid of docker container by "docker inspect"
echo `/usr/bin/docker inspect --format {{.State.Pid}}
container_1438681002528_0001_01_000002` >
.../container_1438681002528_0001_01_000002.pid.tmp
### rename *.pid.tmp to *.pid
/bin/mv -f .../container_ 1438681002528_0001_01_000002.pid.tmp
.../container_1438681002528_0001_01_000002.pid
### launch the docker container
/usr/bin/docker run --rm --net=host --name
container_1438681002528_0001_01_000002 -v ... library/mysql
/container_1438681002528_0001_01_000002/launch_container.sh"
{code}
This is obviously wrong because you can not get the pid of a docker container
before starting it. When NodeManager try to kill the container, pid zero is
always read from the pid file.
was:
The docker_container_executor_session.sh is generated like below:
{code}
### get the pid of docker container by "docker inspect"
echo `/usr/bin/docker inspect --format {{.State.Pid}}
container_1438681002528_0001_01_000002` >
.../container_1438681002528_0001_01_000002.pid.tmp
### rename *.pid.tmp to *.pid
/bin/mv -f .../container_ 1438681002528_0001_01_000002.pid.tmp
.../container_1438681002528_0001_01_000002.pid
### launch the docker container
/usr/bin/docker run --rm --net=host --name
container_1438681002528_0001_01_000002 -v ... library/mysql
/container_1438681002528_0001_01_000002/launch_container.sh"
{code}
This is obviously wrong because you can not get the pid of a docker container
before starting it.
> docker container is still running when app is killed
> ----------------------------------------------------
>
> Key: YARN-4016
> URL: https://issues.apache.org/jira/browse/YARN-4016
> Project: Hadoop YARN
> Issue Type: Bug
> Components: nodemanager
> Reporter: Hong Zhiguo
> Assignee: Hong Zhiguo
>
> The docker_container_executor_session.sh is generated like below:
> {code}
> ### get the pid of docker container by "docker inspect"
> echo `/usr/bin/docker inspect --format {{.State.Pid}}
> container_1438681002528_0001_01_000002` >
> .../container_1438681002528_0001_01_000002.pid.tmp
> ### rename *.pid.tmp to *.pid
> /bin/mv -f .../container_ 1438681002528_0001_01_000002.pid.tmp
> .../container_1438681002528_0001_01_000002.pid
> ### launch the docker container
> /usr/bin/docker run --rm --net=host --name
> container_1438681002528_0001_01_000002 -v ... library/mysql
> /container_1438681002528_0001_01_000002/launch_container.sh"
> {code}
> This is obviously wrong because you can not get the pid of a docker container
> before starting it. When NodeManager try to kill the container, pid zero is
> always read from the pid file.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)