Added logging in docker executor on `docker stop` failure.

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


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

Branch: refs/heads/master
Commit: 4d2afc50c88afff1c197720fa507637def4d2f20
Parents: 364abfc
Author: Andrei Budnik <abud...@mesosphere.com>
Authored: Thu Aug 10 18:52:51 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Aug 10 22:46:35 2017 +0200

----------------------------------------------------------------------
 src/docker/executor.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4d2afc50/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index 26f12ec..e6370f7 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -411,6 +411,11 @@ private:
       // that we can adjust the grace period in the case of
       // a `KillPolicy` override.
       stop = docker->stop(containerName, gracePeriod);
+
+      stop.onFailed(defer(self(), [=](const string& failure) {
+        LOG(ERROR) << "Failed to stop container '" << containerName << "'"
+                   << ": " << failure;
+      }));
     }
   }
 

Reply via email to