docker-containers
docker-containers copied to clipboard
mesos-slave docker image with docker_mesos_image is broken
Hi,
I have been playing with mesos-master and mesos-slave with a goal of running it at production grade. Everything went fine with this documentation: https://github.com/mesosphere/docker-containers/tree/master/mesos... But! On mesos-slave failure, recover would fail and leave orphan docker containers.
I tried using docker_mesos_image option to also run executor inside a docker container, but it failed to run as the mesos-slave image has an entrypoint ("mesos-slave"), and executor is ran using a command => the command executed inside executor looks like this:
mesos-slave /var/lib/mesos-executor --blabla...
The solution I came up with is the next one:
- Using mesosphere/mesos image with entrypoint specified at runtime (docker run --entrypoint mesos-slave)
- Binding mesos-slave to host PID namespace (--pid=host)
That way, everything recovers well after a failure, and there are no orphan containers left. Hopefully it helps.
I have opened a pull request for this issue: https://github.com/mesosphere/docker-containers/pull/84.