You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2016/11/29 21:44:18 UTC

[3/4] mesos git commit: Fixed conflict in hook result handling.

Fixed conflict in hook result handling.

Review: https://reviews.apache.org/r/54165/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/63cc0fb4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/63cc0fb4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/63cc0fb4

Branch: refs/heads/master
Commit: 63cc0fb49a0370d596e2c9cf87c6c5025372dd15
Parents: 1fe9876
Author: Till Toenshoff <to...@me.com>
Authored: Tue Nov 29 22:05:39 2016 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Tue Nov 29 22:43:55 2016 +0100

----------------------------------------------------------------------
 src/slave/containerizer/docker.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/63cc0fb4/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index d6818a6..cc48e6f 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -1156,14 +1156,16 @@ Future<bool> DockerContainerizerProcess::launch(
           }
         }
 
+        if (!decoratorInfo.has_taskenvironment()) {
+          return Nothing();
+        }
+
         map<string, string> taskEnvironment;
 
-        if (decoratorInfo.has_taskenvironment()) {
-          foreach (
-              const Environment::Variable& variable,
-              decoratorInfo.taskenvironment().variables()) {
-            taskEnvironment[variable.name()] = variable.value();
-          }
+        foreach (
+            const Environment::Variable& variable,
+            decoratorInfo.taskenvironment().variables()) {
+          taskEnvironment[variable.name()] = variable.value();
         }
 
         if (taskInfo.isSome()) {