mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 51257: Add external process container logger.
Date Tue, 28 Feb 2017 22:59:57 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51257/#review166937
-----------------------------------------------------------



* You may also want to add this to the CMake build.
* There are a couple of extraneous spaces in this patch (like `{ task}` in the test).  Not
really a big deal.


src/slave/container_loggers/lib_externallogger.hpp (lines 58 - 66)
<https://reviews.apache.org/r/51257/#comment239021>

    Nit: Ordering of validation here and some wording suggestions
    
    ```
    if (isExecutable.isError()) {
      return Error(
          "Failed to stat file '" + executablePath + 
          "': " + isExecutable.error());
    }
    
    if (!isExecutable.get()) {
      return Error("File is not an executable: " + executablePath);
    }
    ```



src/slave/container_loggers/lib_externallogger.hpp (line 79)
<https://reviews.apache.org/r/51257/#comment239022>

    Suggestion:
    
    Name of the environment variable used to store the stream identifier ("stdout" or "stderr").



src/slave/container_loggers/lib_externallogger.hpp (line 87)
<https://reviews.apache.org/r/51257/#comment239024>

    You could remove the leading `MESOS_` in the default.



src/slave/container_loggers/lib_externallogger.cpp (lines 99 - 100)
<https://reviews.apache.org/r/51257/#comment239043>

    Nit: Inconsistent use of `.insert` vs `operator[]` in this file.
    
    I would prefer the operator.


- Joseph Wu


On Feb. 13, 2017, 2:41 p.m., Will Rouesnel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51257/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2017, 2:41 p.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Bugs: MESOS-6003
>     https://issues.apache.org/jira/browse/MESOS-6003
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Adds the external process container logger. This functions like the
> logrotate container logger, but instead calls a custom host binary
> (or script) and passes the executorInfo as JSON via environment
> variables. This makes it very easy for users to configure custom
> logging solutions, without needing to write and maintain logging
> modules.
> 
> Tests passing and complete.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am c21a073bdbefbb4547e45ed13b7a8a563854fd82 
>   src/slave/container_loggers/lib_externallogger.hpp PRE-CREATION 
>   src/slave/container_loggers/lib_externallogger.cpp PRE-CREATION 
>   src/tests/container_logger_external.sh PRE-CREATION 
>   src/tests/container_logger_tests.cpp 589d6a9df7ce964052355be41597ef11677ca03d 
>   src/tests/module.hpp e661d95fa44fc1aedfe83c564c826d5b7d32c85b 
>   src/tests/module.cpp 5b83fd6358ddea4c9d849b8992e1a6040ef74505 
> 
> Diff: https://reviews.apache.org/r/51257/diff/
> 
> 
> Testing
> -------
> 
> Adds ContainerLoggerTest.EXTERNAL_RecieveEnvironment which tests all major parameters
of the change.
> 
> A synthetic external container logger is provided by the script tests/container_logger_external.sh
which is setup to fail if any important output is unavailable to the logging process. 
> 
> The other basic checks are duplicated from the Logrotate container logger, from where
this change inherits a lot of its code.
> 
> 
> Thanks,
> 
> Will Rouesnel
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message