You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/03/27 10:27:54 UTC

mesos git commit: Fixed the `mesos-this-capture` warning in the default executor.

Repository: mesos
Updated Branches:
  refs/heads/master 3fbc62c93 -> 124c677c8


Fixed the `mesos-this-capture` warning in the default executor.


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

Branch: refs/heads/master
Commit: 124c677c86c7b12ca4568f004895b8ca30d60dcf
Parents: 3fbc62c
Author: Alexander Rukletsov <al...@apache.org>
Authored: Tue Mar 27 12:27:40 2018 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Tue Mar 27 12:27:40 2018 +0200

----------------------------------------------------------------------
 src/launcher/default_executor.cpp | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/124c677c/src/launcher/default_executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/default_executor.cpp b/src/launcher/default_executor.cpp
index 05cd012..ea0d425 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -1142,7 +1142,6 @@ protected:
       forward(status);
     }
 
-
     // Ideally we should detect and act on this kill's failure, and perform the
     // following actions only once the kill is successful:
     //
@@ -1203,19 +1202,20 @@ protected:
       << " did not terminate after " << timeout << ", sending SIGKILL"
       << " to the container";
 
-    kill(containerId, SIGKILL).onFailed([=](const string& failure) {
-      const Duration duration = Seconds(1);
+    kill(containerId, SIGKILL)
+      .onFailed(defer(self(), [=](const string& failure) {
+        const Duration duration = Seconds(1);
 
-      LOG(WARNING)
-        << "Escalation to SIGKILL the task '" << taskId
-        << "' running in child container " << containerId
-        << " failed: " << failure << "; Retrying in " << duration;
+        LOG(WARNING)
+          << "Escalation to SIGKILL the task '" << taskId
+          << "' running in child container " << containerId
+          << " failed: " << failure << "; Retrying in " << duration;
 
-      process::delay(
-          duration, self(), &Self::escalated, containerId, taskId, timeout);
+        process::delay(
+            duration, self(), &Self::escalated, containerId, taskId, timeout);
 
-      return;
-    });
+        return;
+      }));
   }
 
   void killTask(
@@ -1251,9 +1251,9 @@ protected:
     const ContainerID& containerId = container->containerId;
     kill(container, killPolicy)
       .onFailed(defer(self(), [=](const string& failure) {
-          LOG(WARNING) << "Failed to kill the task '" << taskId
-                       << "' running in child container " << containerId << ": "
-                       << failure;
+        LOG(WARNING) << "Failed to kill the task '" << taskId
+                     << "' running in child container " << containerId << ": "
+                     << failure;
       }));
   }