mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 51406: Updated launch helper to optionally spawn an 'init' process on linux.
Date Fri, 23 Sep 2016 20:59:04 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51406/
-----------------------------------------------------------

(Updated Sept. 23, 2016, 8:59 p.m.)


Review request for mesos and Jie Yu.


Changes
-------

Updated for more robust signal forwarding, as well as consistent checkpointing of the exit
status. We also now support checkpointing on Posix as well as Linux. Tests are forthcoming.


Bugs: MESOS-6088
    https://issues.apache.org/jira/browse/MESOS-6088


Repository: mesos


Description (updated)
-------

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 wait 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 '--runtime_directory' argument, 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.


Diffs (updated)
-----

  src/slave/containerizer/mesos/launch.hpp 859990cb85e9e8c06400397256cfc512f0811800 
  src/slave/containerizer/mesos/launch.cpp 777121cffaa5fc76adfefc1e617409d997c7aac8 

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


Testing
-------

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


Thanks,

Kevin Klues


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