[prev in list] [next in list] [prev in thread] [next in thread]
List: mesos-commits
Subject: [05/12] git commit: Minor cleanup when creating Docker containers.
From: benh () apache ! org
Date: 2014-10-31 22:06:04
Message-ID: d07eeb4af21847838fa87dec86e75a13 () git ! apache ! org
[Download RAW message or body]
Minor cleanup when creating Docker containers.
Review: https://reviews.apache.org/r/26616
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e6fb81c6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e6fb81c6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e6fb81c6
Branch: refs/heads/master
Commit: e6fb81c69a82bbdecf67d1800955f409be018c22
Parents: 9ce1fc5
Author: Benjamin Hindman <benjamin.hindman@gmail.com>
Authored: Sat Oct 11 14:44:31 2014 -0700
Committer: Benjamin Hindman <benjamin.hindman@gmail.com>
Committed: Fri Oct 31 15:05:39 2014 -0700
----------------------------------------------------------------------
src/slave/containerizer/docker.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e6fb81c6/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 73e3c40..4bf5be4 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -234,7 +234,14 @@ private:
slaveId(slaveId),
slavePid(slavePid),
checkpoint(checkpoint),
- flags(flags) {}
+ flags(flags)
+ {
+ if (task.isSome()) {
+ resources = task.get().resources();
+ } else {
+ resources = executor.resources();
+ }
+ }
std::string name()
{
@@ -993,10 +1000,6 @@ Future<bool> DockerContainerizerProcess::___launch(
return Failure("Failed to synchronize with child process: " + error);
}
- // Store the resources for usage().
- CHECK_SOME(container->task);
- container->resources = container->task.get().resources();
-
// And finally watch for when the executor gets reaped.
container->status.set(process::reap(s.get().pid()));
@@ -1102,9 +1105,6 @@ Future<bool> DockerContainerizerProcess::_____launch(
"Failed to checkpoint executor's pid: " + checkpointed.error());
}
- // Store the resources for usage().
- containers_[containerId]->resources = containers_[containerId]->executor.resources();
-
// And finally watch for when the container gets reaped.
containers_[containerId]->status.set(process::reap(pid.get()));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic