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

[mesos] 01/06: Made starting and stopping on CSI plugin containers more verbose.

This is an automated email from the ASF dual-hosted git repository.

chhsiao pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 91cf91c1f26a3fb0d7c1bded9ce47f017bf3bab5
Author: Benjamin Bannier <be...@mesosphere.io>
AuthorDate: Thu Jan 24 10:04:51 2019 +0100

    Made starting and stopping on CSI plugin containers more verbose.
    
    This patch adds some additional logging so it becomes easier to follow
    the lifecycle of CSI plugins. The container daemon already logged some
    related information, but didn't directly call out that it was working
    with CSI plugin containers.
    
    Review: https://reviews.apache.org/r/69606/
---
 src/resource_provider/storage/provider.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/resource_provider/storage/provider.cpp b/src/resource_provider/storage/provider.cpp
index 111a7b9..f7a8634 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -2013,6 +2013,11 @@ Future<csi::v0::Client> StorageLocalResourceProviderProcess::getService(
       config->resources(),
       containerInfo,
       std::function<Future<Nothing>()>(defer(self(), [=]() -> Future<Nothing> {
+        LOG(INFO)
+          << "CSI plugin container '" << containerId << "' started for plugin"
+          << " type '" << info.storage().plugin().type() << "' and "
+          << " name '" << info.storage().plugin().name() << "'";
+
         CHECK(services.at(containerId)->associate(connect(endpointPath)));
         return services.at(containerId)->future()
           .then([] { return Nothing(); });
@@ -2023,6 +2028,11 @@ Future<csi::v0::Client> StorageLocalResourceProviderProcess::getService(
         services.at(containerId)->discard();
         services.at(containerId).reset(new Promise<csi::v0::Client>());
 
+        LOG(INFO)
+          << "CSI plugin container '" << containerId << "' stopped for plugin"
+          << " type '" << info.storage().plugin().type() << "' and "
+          << " name '" << info.storage().plugin().name() << "'";
+
         if (os::exists(endpointPath)) {
           Try<Nothing> rm = os::rm(endpointPath);
           if (rm.isError()) {