mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gilb...@apache.org
Subject [2/2] mesos git commit: Added isolator logs for volume/secret isolator and container logger.
Date Thu, 24 May 2018 01:25:15 GMT
Added isolator logs for volume/secret isolator and container logger.

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


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

Branch: refs/heads/1.5.x
Commit: 5a17c08929e7c597b9861c26fb4ccf86e26791b6
Parents: 9a5a749
Author: Gilbert Song <songzihao1990@gmail.com>
Authored: Mon May 21 16:42:53 2018 -0700
Committer: Gilbert Song <songzihao1990@gmail.com>
Committed: Wed May 23 18:23:42 2018 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/io/switchboard.cpp          | 10 ++++++++--
 src/slave/containerizer/mesos/isolators/volume/secret.cpp |  5 ++++-
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5a17c089/src/slave/containerizer/mesos/io/switchboard.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/io/switchboard.cpp b/src/slave/containerizer/mesos/io/switchboard.cpp
index dc48a2b..6d167f5 100644
--- a/src/slave/containerizer/mesos/io/switchboard.cpp
+++ b/src/slave/containerizer/mesos/io/switchboard.cpp
@@ -303,19 +303,25 @@ Future<Option<ContainerLaunchInfo>> IOSwitchboard::_prepare(
     const ContainerConfig& containerConfig,
     const ContainerIO& loggerIO)
 {
+  bool requiresServer = IOSwitchboard::requiresServer(containerConfig);
+
   // On windows, we do not yet support running an io switchboard
   // server, so we must error out if it is required.
 #ifdef __WINDOWS__
-  if (IOSwitchboard::requiresServer(containerConfig)) {
+  if (requiresServer) {
       return Failure(
           "IO Switchboard server is not supported on windows");
   }
 #endif
 
+  LOG(INFO) << "Container logger module finished preparing container "
+            << containerId << "; IOSwitchboard server is "
+            << (requiresServer ? "" : "not") << " required";
+
   bool hasTTY = containerConfig.has_container_info() &&
                 containerConfig.container_info().has_tty_info();
 
-  if (!IOSwitchboard::requiresServer(containerConfig)) {
+  if (!requiresServer) {
     CHECK(!containerIOs.contains(containerId));
     containerIOs[containerId] = loggerIO;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/5a17c089/src/slave/containerizer/mesos/isolators/volume/secret.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/volume/secret.cpp b/src/slave/containerizer/mesos/isolators/volume/secret.cpp
index 8071e4e..d1bc7c5 100644
--- a/src/slave/containerizer/mesos/isolators/volume/secret.cpp
+++ b/src/slave/containerizer/mesos/isolators/volume/secret.cpp
@@ -291,7 +291,10 @@ Future<Option<ContainerLaunchInfo>> VolumeSecretIsolatorProcess::prepare(
   }
 
   return collect(futures)
-    .then([launchInfo]() -> Future<Option<ContainerLaunchInfo>> {
+    .then([launchInfo, containerId](
+        const list<Nothing>& results) -> Future<Option<ContainerLaunchInfo>>
{
+      LOG(INFO) << results.size() << " secrets have been resolved for "
+                << "container " << containerId;
       return launchInfo;
     });
 }


Mime
View raw message