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

(Updated Dec. 21, 2015, 5:34 p.m.)

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

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 

Diff: https://reviews.apache.org/r/41560/diff/


make check (Centos7)
sudo bin/mesos-tests.sh --gtest_filter="*ROOT_DOCKER_Logs*"

Also confirmed that the changed pipes will still output to the sandbox.  See 
below for repro steps.


# Manual test for launching an executor from an agent launched with 


FROM centos:7
MAINTAINER Joseph Wu <jos...@mesosphere.io>

RUN yum -y update systemd

RUN yum install -y tar wget
RUN wget 
-O /etc/yum.repos.d/epel-apache-maven.repo

RUN yum groupinstall -y "Development Tools"
RUN yum install -y apache-maven python-devel java-1.7.0-openjdk-devel 
zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 
apr-devel subversion-devel apr-util-devel libevent-devel

RUN yum install -y perf nmap-ncat

RUN yum install -y git

RUN yum install -y docker

# Export environment.
ENV JAVA_HOME /usr/lib/jvm/java-1.7.0-openjdk/

# Include libmesos on library path.
ENV LD_LIBRARY_PATH /usr/local/lib

# Copy local checkout into /opt
ADD . /opt


# Configure!
RUN ./bootstrap
RUN mkdir -p build && cd build && ../configure --enable-ssl --enable-libevent

WORKDIR /opt/build

# Build and cleanup in a single layer.
RUN make -j4 install && cd /


On Centos7, prepare the docker image:
sudo docker build -t mesos/mesos:git-docker-pipe .


Start the master:
bin/mesos-master.sh --work_dir=/tmp/master --ip=

Start the agent inside a Docker container:
sudo docker run -t  -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/mesos:git-docker-pipe \
mesos-slave --master= --containerizers=docker 
--docker_mesos_image="mesos/mesos:git-docker-pipe" --switch_user=false

Run one of the following (they should both work):

src/mesos-execute --master= --containerizer=docker 
--docker_image=busybox --name="DockerInDocker" --command="echo hello"

Then check to see if anything was printed in 


Joseph Wu

Reply via email to