----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54356/#review158127 -----------------------------------------------------------
src/slave/containerizer/mesos/io/switchboard.cpp (lines 599 - 604) <https://reviews.apache.org/r/54356/#comment228862> Same as we did in recovery, this treat this flag as a knob for new containers. src/slave/containerizer/mesos/io/switchboard.cpp (lines 606 - 608) <https://reviews.apache.org/r/54356/#comment228861> 'watch' might be called for containers that don't have io switchboard server. So we should not return a failure here. src/slave/containerizer/mesos/io/switchboard.cpp (line 610) <https://reviews.apache.org/r/54356/#comment228870> we probably should not treat it as a failure if 'status' is None(). After agent restart, the reap with return None() for all existing io switchboard server because the parent/child relationship has been broken. So: ``` return status .then([](const Option<int>& status) { if (status.isNone()) { return Future<ContainerLimitation>(); } if (status.isSome() && WIFEXITED(status.get()) && WEXITSTATUS(status.get()) == 0) { return Future<ContainerLimitation>(); } ... }); ``` src/tests/containerizer/io_switchboard_tests.cpp (line 566) <https://reviews.apache.org/r/54356/#comment228871> I'll probably add a namespace alias at the beinging ``` namespace paths = mesos::internal::slave::containerizer::paths; ``` src/tests/containerizer/io_switchboard_tests.cpp (lines 587 - 588) <https://reviews.apache.org/r/54356/#comment228872> I'd move this test to a separate patch. src/tests/containerizer/io_switchboard_tests.cpp (lines 634 - 655) <https://reviews.apache.org/r/54356/#comment228873> I would probably rewrite this test and create agent instead. It's much easier to simulate an agent restart with a full MesosTest with agent and master. - Jie Yu On Dec. 6, 2016, 12:27 a.m., Kevin Klues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54356/ > ----------------------------------------------------------- > > (Updated Dec. 6, 2016, 12:27 a.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-6663 > https://issues.apache.org/jira/browse/MESOS-6663 > > > Repository: mesos > > > Description > ------- > > We use watch() to trigger the destruction of a container if the > io switchboard server process ever exits unexpectedly. > > > Diffs > ----- > > include/mesos/mesos.proto 657dcb8edde3154efec21bd147663fc704f97482 > include/mesos/v1/mesos.proto 36c122784daa190e25903e8bd4a05f7f1507c304 > src/slave/containerizer/mesos/io/switchboard.hpp > 839665a22aca9b1c1c1cf4992406bc924ee2b065 > src/slave/containerizer/mesos/io/switchboard.cpp > 19f2b625f2aa4b790fbe80b8dfad44b219f2c24e > src/tests/containerizer/io_switchboard_tests.cpp > c8fe8768db705d97299215ab69b91babb8bbc2f9 > > Diff: https://reviews.apache.org/r/54356/diff/ > > > Testing > ------- > > GTEST_FILTER="" make -j check > sudo src/mesos-tests > > > Thanks, > > Kevin Klues > >
