Updated comments related to `wait`, `destroy` containerizer methods. This patch updates description of `wait()` and `destroy()` methods of the containerizer API.
Review: https://reviews.apache.org/r/67130/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b549c9ca Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b549c9ca Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b549c9ca Branch: refs/heads/master Commit: b549c9cac15100cc0497aaa41073be16f678e14a Parents: a8eac5b Author: Andrei Budnik <abud...@mesosphere.com> Authored: Fri May 25 09:08:28 2018 +0800 Committer: Qian Zhang <zhq527...@gmail.com> Committed: Fri May 25 09:08:28 2018 +0800 ---------------------------------------------------------------------- src/slave/containerizer/containerizer.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/b549c9ca/src/slave/containerizer/containerizer.hpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/containerizer.hpp b/src/slave/containerizer/containerizer.hpp index 5817b1d..675dfad 100644 --- a/src/slave/containerizer/containerizer.hpp +++ b/src/slave/containerizer/containerizer.hpp @@ -128,18 +128,18 @@ public: // Wait on the 'ContainerTermination'. If the executor terminates, // the containerizer should also destroy the containerized context. - // Returns None if the container cannot be found. // The future may be failed if an error occurs during termination of // the executor or destruction of the container. + // + // Returns `None` if the container cannot be found. + // NOTE: For terminated nested containers, whose parent container is + // still running, the checkpointed `ContainerTermination` must be returned. virtual process::Future<Option<mesos::slave::ContainerTermination>> wait( const ContainerID& containerId) = 0; - // Destroy a running container, killing all processes and releasing - // all resources. Returns None when the container cannot be found, - // or a failure if something went wrong. - // - // NOTE: You cannot wait() on containers that have been destroyed, - // so you should always call wait() before destroy(). + // Destroy a starting or running container, killing all processes and + // releasing all resources. Returns the same result as `wait()` method, + // therefore calling `wait()` right before `destroy()` is not required. virtual process::Future<Option<mesos::slave::ContainerTermination>> destroy( const ContainerID& containerId) = 0;