mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <>
Subject Re: Review Request 51406: Updated launch helper to optionally spawn an 'init' process on linux.
Date Sun, 18 Sep 2016 18:57:25 GMT

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

(Updated Sept. 18, 2016, 6:57 p.m.)

Review request for mesos and Jie Yu.


Updated testing done.

Bugs: MESOS-6088

Repository: mesos


Previously the 'mesos-containerizer launch' binary would simply exec
into the actual command we wanted to launch after doing some set of
preperatory work. The problem with this approach, however, is that
this gives us no opportunity to checkpoint the exit status of the
command so the agent can recover it in cases where it is offline at
the time the command completes.

To compensate for this, we now allow 'mesos-containerizer launch' to
take an optional '--wait_status_path' parameter, which indicates where
to checkpint the status of the launched command (as returned by
'waitpid()'). In order to do this checkpointing, however, we cannot
simply exec into the command anymore. Instead we now fork-exec the
command and reap it once it completes. We then checkpoint its status
and return it as our own. We call the original process the 'init'
process of the container and the fork-exec'd process its child.  As a
side effect of doing things this way, we also have to be careful to
forward all signals sent to the init process down to the child.

In a subsequent commit we will update the mesos containerizer to use
this new functionality.


  src/slave/containerizer/mesos/launch.hpp 859990cb85e9e8c06400397256cfc512f0811800 
  src/slave/containerizer/mesos/launch.cpp fc51e04ec1572679e6a48ff4f0fa31ef2dfd6ec3 


Testing (updated)

$ GTEST_FILTER="" make -j check
$ src/mesos-tests
$ sudo src/mesos-tests


Kevin Klues

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