----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51674/#review150339 -----------------------------------------------------------
src/slave/containerizer/mesos/containerizer.hpp (line 234) <https://reviews.apache.org/r/51674/#comment218273> typo? src/slave/containerizer/mesos/containerizer.hpp (line 246) <https://reviews.apache.org/r/51674/#comment218274> of the container. src/slave/containerizer/mesos/containerizer.cpp (lines 1707 - 1710) <https://reviews.apache.org/r/51674/#comment218275> Now that 'destroy' returns a Future, we can simply do: ``` list<Future<bool>> destroys; foreach (const ContainerID& child, container->children) { LOG(INFO) << "..."; destroys.push_back(destroy(child)); } return collect(destroys) .then(defer(self(), &Self::_destroy, containerId)); ``` src/slave/containerizer/mesos/containerizer.cpp (line 1713) <https://reviews.apache.org/r/51674/#comment218276> You should not use 'await' here because if any of the destroy on child container fails, we should not continue destroy the parent container because that breaks our invariant. src/slave/containerizer/mesos/containerizer.cpp (lines 1945 - 1964) <https://reviews.apache.org/r/51674/#comment218278> Per our discussion, this is not necessary. Please update it. - Jie Yu On Sept. 24, 2016, 6:50 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51674/ > ----------------------------------------------------------- > > (Updated Sept. 24, 2016, 6:50 p.m.) > > > Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Jie Yu, Joseph > Wu, and Kevin Klues. > > > Repository: mesos > > > Description > ------- > > This patch makes the mesos containerizer destroy to be recursive. > To destroy a container with children nested under it, all its > children will be destroyed first, recursively. Then, the container > will get destroyed after all children destroy finish. > > > Diffs > ----- > > src/slave/containerizer/mesos/containerizer.hpp > 16f9e3e92e90fe7f8a0ebd24e567800e1f285bc9 > src/slave/containerizer/mesos/containerizer.cpp > 144b0db501d40d4e0bba12672723616bedd76e7e > > Diff: https://reviews.apache.org/r/51674/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > >
