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 53473: Add new param user to logrotate's prepare function.
Date Fri, 04 Nov 2016 20:25:27 GMT

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




include/mesos/slave/container_logger.hpp (line 154)
<https://reviews.apache.org/r/53473/#comment224803>

    With your current patch, the logrotate logger will always specify the `--user` flag, even
if `switch_user` is false.  If we had a test with the logrotate logger & `flags.switch_user
= false`, it would likely fail.
    
    An `Option<string>& user` is more accurate here.
    
    Note: For flags parsing, `--user=""` explicitly sets the user to empty string (rather
than setting `Option<string> user` to `None`).



src/slave/containerizer/docker.cpp (lines 1282 - 1285)
<https://reviews.apache.org/r/53473/#comment224804>

    If the `prepare` function takes an `Option<string>` instead, you can simply pass
along `container->user` (with no `.get()`).



src/slave/containerizer/mesos/containerizer.cpp (lines 1364 - 1367)
<https://reviews.apache.org/r/53473/#comment224805>

    Ditto here.


- Joseph Wu


On Nov. 4, 2016, 7:58 a.m., Sivaram Kannan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53473/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 7:58 a.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Bugs: MESOS-5856
>     https://issues.apache.org/jira/browse/MESOS-5856
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add new param user to logrotate's prepare function.
> 
> 
> Diffs
> -----
> 
>   include/mesos/slave/container_logger.hpp 939974736f9eb744c83036e074718d2a1eba8b0a 
>   src/slave/container_loggers/lib_logrotate.hpp 28fdf3bdcc66d473521b377f66ab0b48f6900f58

>   src/slave/container_loggers/lib_logrotate.cpp 53698d339f0f4d2dc916b53239ca0c36bbebcd42

>   src/slave/container_loggers/logrotate.hpp d1db69236f5a9b1dbb3113ad02218a512afdb46b

>   src/slave/container_loggers/sandbox.hpp e0aeb32a9ec83af049af8a10010b819c1d8b25d8 
>   src/slave/container_loggers/sandbox.cpp cc263ebef7e0c3e778fabafa49faa6dd315adc45 
>   src/slave/containerizer/docker.cpp c2ed5240aab9ea9d1a386c44c94e5ae7e98d313c 
>   src/slave/containerizer/mesos/containerizer.cpp 67cc595278f124cdf518d2f4fcfb257439f067e2

>   src/tests/container_logger_tests.cpp 1bb94a8461e481983f25a44737e4011ed5fc4b1f 
> 
> Diff: https://reviews.apache.org/r/53473/diff/
> 
> 
> Testing
> -------
> 
> Run the mesos-logrotate-logger with un-priviledged user and verify whether the logs are
getting rotated.
> Run the mesos-logrotate-logger as root user and verify whether the logs are getting rotated.
> 
> 
> Thanks,
> 
> Sivaram Kannan
> 
>


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