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

alexr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a00a0a  Added a comment around recovery for `ContainerLogger`s.
8a00a0a is described below

commit 8a00a0ad6e8896358c8ecca776cd10535e1dec56
Author: Alexander Rukletsov <[email protected]>
AuthorDate: Tue Mar 5 23:31:05 2019 +0100

    Added a comment around recovery for `ContainerLogger`s.
    
    `ContainerLogger` interface does not currently use a
    "prepare-recover-cleanup" pattern and hence neither allows
    stateful loggers nor provides synchronization on container
    termination. Capture this in a comment to the interface.
    
    Review: https://reviews.apache.org/r/70131
---
 include/mesos/slave/container_logger.hpp | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/include/mesos/slave/container_logger.hpp 
b/include/mesos/slave/container_logger.hpp
index 4e6d15a..77034d6 100644
--- a/include/mesos/slave/container_logger.hpp
+++ b/include/mesos/slave/container_logger.hpp
@@ -43,8 +43,17 @@ namespace slave {
  * The `ContainerLogger` is responsible for handling the stdout/stderr of
  * containers.
  *
- * The container logger is also responsible for providing a public interface
- * for retrieving the logs.
+ * The container logger is also responsible for providing a public interface 
for
+ * retrieving the logs.
+ *
+ * Care should be taken when implementing stateful container loggers: the 
logger
+ * should be capable of recovering its state and its managed containers during
+ * the agent recovery process in absence of such interface methods as
+ * `ContainerLogger::recover()` and `ContainerLogger::cleanup()`.
+ *
+ * The lack of `ContainerLogger::cleanup()` or similar prevents synchronization
+ * on container termination, i.e., delaying sending a terminal status update 
for
+ * the container until the logger reports completion.
  *
  * TODO(josephw): Provide an interface for exposing custom log-retrieval
  * endpoints via the Mesos web UI.
@@ -84,10 +93,7 @@ public:
    * within the `ContainerIO` as much as necessary, with some exceptions;
    * see the struct `ContainerIO` above.
    *
-   * NOTE: The container logger should not lose stdout/stderr if the agent 
fails
-   * over. Additionally, if the container logger is stateful, the logger should
-   * be capable of recovering managed containers during the agent recovery
-   * process. See `ContainerLogger::recover`.
+   * The container logger should not lose stdout/stderr if the agent fails 
over.
    *
    * @param containerId The ID of the container.
    * @param containerConfig The configurations of the container, including the

Reply via email to