You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/05/30 20:50:59 UTC
mesos git commit: Fixed a bug in
'ComposingContainerizerProcess::wait()'.
Repository: mesos
Updated Branches:
refs/heads/master ac1571d24 -> 55e7ea5ed
Fixed a bug in 'ComposingContainerizerProcess::wait()'.
Fixed a bug in the Composing Containerizer that would make it always
immediately return 'None' when trying to wait on a nested container
that had already been terminated and whose exit status was checkpointed.
Review: https://reviews.apache.org/r/59537/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/55e7ea5e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/55e7ea5e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/55e7ea5e
Branch: refs/heads/master
Commit: 55e7ea5ed788acb0e4f810dd4575a5a4479520d1
Parents: ac1571d
Author: Gastón Kleiman <ga...@mesosphere.io>
Authored: Tue May 30 13:50:06 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue May 30 13:50:06 2017 -0700
----------------------------------------------------------------------
src/slave/containerizer/composing.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/55e7ea5e/src/slave/containerizer/composing.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/composing.cpp b/src/slave/containerizer/composing.cpp
index c6b6ddf..a003e1b 100644
--- a/src/slave/containerizer/composing.cpp
+++ b/src/slave/containerizer/composing.cpp
@@ -543,11 +543,19 @@ Future<ContainerStatus> ComposingContainerizerProcess::status(
Future<Option<ContainerTermination>> ComposingContainerizerProcess::wait(
const ContainerID& containerId)
{
- if (!containers_.contains(containerId)) {
+ // A nested container might have already been terminated, therefore
+ // `containers_` might not contain it, but its exit status might have
+ // been checkpointed.
+ //
+ // The containerizer that launched the root container should be able
+ // to retrieve the exit status even if it has been checkpointed.
+ const ContainerID rootContainerId = protobuf::getRootContainerId(containerId);
+
+ if (!containers_.contains(rootContainerId)) {
return None();
}
- return containers_[containerId]->containerizer->wait(containerId);
+ return containers_[rootContainerId]->containerizer->wait(containerId);
}