----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63887/#review191331 -----------------------------------------------------------
src/slave/containerizer/composing.cpp Lines 382-384 (original), 386-389 (patched) <https://reviews.apache.org/r/63887/#comment269142> Update this comment. src/slave/containerizer/composing.cpp Lines 389 (patched) <https://reviews.apache.org/r/63887/#comment269143> Can't you simply pass `ContainerTermination` to `set()`? src/slave/containerizer/composing.cpp Lines 615-617 (patched) <https://reviews.apache.org/r/63887/#comment269149> Note that it is safe to call `_destroy()` multiple times (this can happen). src/slave/containerizer/composing.cpp Lines 634-638 (patched) <https://reviews.apache.org/r/63887/#comment269150> `return future->isSome() ? true : false;` src/slave/containerizer/composing.cpp Line 641 (original), 646-648 (patched) <https://reviews.apache.org/r/63887/#comment269152> Let's keep somehting simialr to the original comment here, explaining that if `termination` is already set in `_launch()`, `associate()` is a no-op and this is intended. - Alexander Rukletsov On Nov. 16, 2017, 8:42 p.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63887/ > ----------------------------------------------------------- > > (Updated Nov. 16, 2017, 8:42 p.m.) > > > Review request for mesos, Alexander Rukletsov, Gilbert Song, and Jie Yu. > > > Bugs: MESOS-7506 > https://issues.apache.org/jira/browse/MESOS-7506 > > > Repository: mesos > > > Description > ------- > > Previously, `wait()` and `destroy()` methods of composing containerizer > returned a future that might be set to `READY` state while the internal > state of composing containerizer is not yet cleaned up. > > This patch adds a `termination` promise to `Container` struct, > which is used to return a future from `wait()` and `destroy()` methods. > This promise is set to `READY` state iff related container is > completely destroyed. > `_destroy()` callback is subscribed for a future from `wait()`, which is > called on related containerizer, to propagate a value to the > `termination` promise and do the cleanup. > > > Diffs > ----- > > src/slave/containerizer/composing.cpp > 64919ef1e61a984956c2280ae6b1890c4d135ad1 > > > Diff: https://reviews.apache.org/r/63887/diff/1/ > > > Testing > ------- > > sudo make check > internal CI > > > Thanks, > > Andrei Budnik > >