mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Wu" <>
Subject Re: Review Request 41560: Change Docker::run to take Subprocess::IO instead of Option<string>
Date Fri, 18 Dec 2015 23:57:14 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 18, 2015, 3:57 p.m.)

Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Jie Yu, Joris Van Remoortere,
and Timothy Chen.


Updated "Testing Done" to a partially complete, but currently incorrect manual test.

Bugs: MESOS-4137

Repository: mesos


This changes the FDs used by the `mesos-docker-executor` to inherit rather than open anew.

In the `mesos-docker-executor`, we originally passed the log file path (i.e. `path::join(sandboxDirectory,
"stdout")`) as an argument to `Docker::run`.  In the executor's context, the log file is already
open as `STDOUT_FILENO`.

By inheriting the FD, the docker containerizer's logging-code will path mirrors that of the
mesos containerizer.


  src/docker/docker.hpp 33d6fb3e82ff7328ad093648a45546a18ec7b8cb 
  src/docker/docker.cpp 5dc4667d93b143b54841d85606affe3e4926757a 
  src/docker/executor.cpp 4042cec0acbe03d937ea3c53ffde745cbba552d2 
  src/slave/containerizer/docker.cpp 2d2dd4e0df36207c5f3cbb4fe2c50df51c0f3e9e 
  src/tests/mesos.hpp 1c6acabab9d189a6d3cc8d63359053fd230377b8 


Testing (updated)

make check (Centos7)
sudo bin/ --gtest_filter="*ROOT_DOCKER_Logs*"


[WIP] Manual test for launching an executor from an agent launched with `--docker_mesos_image=<something>`

On Centos7, prepare the docker image:

# Run the base Centos7 image with the build directory.
# Make sure you copy/remember the CONTAINER_ID from the shell.
sudo docker run -t -i centos:7 /bin/bash

# Install some shared libraries.
[root@<CONTAINER_ID> /]# yum install -y libevent zlib libcurl openssl cyrus-sasl cyrus-sasl-md5
apr subversion apr-util

[root@<CONTAINER_ID> /]# yum install -y docker

# We're done with edits.
[root@<CONTAINER_ID> /]# exit

sudo docker commit -m "Add Mesos runtime dependencies" -a "John Doe" <CONTAINER_ID>


Start the master:
# We don't really care where the master is.
bin/ --work_dir=/tmp/master --ip=

Start the agent inside a Docker container:
sudo docker run -t -v /home/vagrant/mesos/build:/home/vagrant/mesos/build -v /var/run/docker.sock:/var/run/docker.sock
-v /sys/fs/cgroup:/sys/fs/cgroup -v /tmp/mesos:/tmp/mesos --pid=host --net=host -i mesos/centos7:dev
[root@centos /]# cd /home/vagrant/mesos/build/
[root@centos /]# bin/ --master= --containerizers=docker --docker_mesos_image="mesos/centos7:dev"

Run our handy command-task spawning framework:

Then check to see if anything was printed in `/tmp/mesos/slaves/<SLAVE_ID>/frameworks/<FRAMEWORK_ID>/executors/0/runs/latest/`.


Currently, the above steps lead to the following output in "stderr":
/bin/sh: /home/vagrant/mesos/build/src/mesos-docker-executor: No such file or directory


Joseph Wu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message