----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51406/#review149401 -----------------------------------------------------------
Ship it! Ship It! - Jie Yu On Sept. 18, 2016, 6:57 p.m., Kevin Klues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51406/ > ----------------------------------------------------------- > > (Updated Sept. 18, 2016, 6:57 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-6088 > https://issues.apache.org/jira/browse/MESOS-6088 > > > Repository: mesos > > > Description > ------- > > 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. > > > Diffs > ----- > > src/slave/containerizer/mesos/launch.hpp > 859990cb85e9e8c06400397256cfc512f0811800 > src/slave/containerizer/mesos/launch.cpp > fc51e04ec1572679e6a48ff4f0fa31ef2dfd6ec3 > > Diff: https://reviews.apache.org/r/51406/diff/ > > > Testing > ------- > > $ GTEST_FILTER="" make -j check > $ src/mesos-tests > $ sudo src/mesos-tests > > > Thanks, > > Kevin Klues > >
