mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Yu" <yujie....@gmail.com>
Subject Re: Review Request 33746: Improve logging of clone flags for linux_launcher.
Date Fri, 01 May 2015 17:43:37 GMT

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

Ship it!



src/linux/ns.hpp
<https://reviews.apache.org/r/33746/#comment132962>

    Consider s/stringify/names/ ?



src/linux/ns.hpp
<https://reviews.apache.org/r/33746/#comment132960>

    Using a map here is more appropriate and avoids the extra type?
    
    ```
    map<int, std::string> names = {
      {CLONE_NEWIPC, "CLONE_NEWIPC"},
      {CLONE_NEWNET, "CLONE_NEWNET"},
      ...
    }
    
    std::vector<std::string> namespaces;
    foreachpair (int flag, const std::string& name, names) {
      if (clone & flag) {
        namespaces.push_back(name);
      }
    }
    
    return strings::join(" | ", namesapces);
    ```


- Jie Yu


On May 1, 2015, 5:27 a.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33746/
> -----------------------------------------------------------
> 
> (Updated May 1, 2015, 5:27 a.m.)
> 
> 
> Review request for mesos, Chi Zhang and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Improve logging of clone flags for linux_launcher.
> 
> 
> Diffs
> -----
> 
>   src/linux/ns.hpp 87ff82c2efdf26f38b81f8440640bf04def05931 
>   src/slave/containerizer/linux_launcher.cpp b9e22e3c70bed0c29e2ca8632411789d33f779a8

> 
> Diff: https://reviews.apache.org/r/33746/diff/
> 
> 
> Testing
> -------
> 
> Example output:
> 
> I0501 05:13:25.414758  7838 linux_launcher.cpp:212] Cloning child process with flags
= CLONE_NEWNS | CLONE_NEWPID
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


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