mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhq527...@gmail.com>
Subject Re: Review Request 60495: Added network ports isolator listen socket utilities.
Date Mon, 04 Sep 2017 09:51:11 GMT

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




src/slave/containerizer/mesos/isolators/network/ports.cpp
Lines 118-119 (patched)
<https://reviews.apache.org/r/60495/#comment260627>

    A newline between.



src/slave/containerizer/mesos/isolators/network/ports.cpp
Lines 120-124 (patched)
<https://reviews.apache.org/r/60495/#comment260632>

    Better to change to:
    ```
        Error error = ErrnoError("Failed to read symbolic link '" + path::join(fdPath, entry->d_name)
+ "'"");
        closedir(dir);
        return error;
    ```



src/slave/containerizer/mesos/isolators/network/ports.cpp
Lines 124 (patched)
<https://reviews.apache.org/r/60495/#comment260629>

    s/link/symbolic link/



src/slave/containerizer/mesos/isolators/network/ports.cpp
Lines 133 (patched)
<https://reviews.apache.org/r/60495/#comment260630>

    I think here we need to add some code to handle the case that `readdir()` fails (i.e.,
it returns `nullptr`).



src/slave/containerizer/mesos/isolators/network/ports.cpp
Lines 134 (patched)
<https://reviews.apache.org/r/60495/#comment260631>

    We need to check if `closedir()` succeeds or not.


- Qian Zhang


On Aug. 15, 2017, 7:40 a.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60495/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 7:40 a.m.)
> 
> 
> Review request for mesos, Qian Zhang and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-7675
>     https://issues.apache.org/jira/browse/MESOS-7675
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented network ports isolator socket utilities to find the
> inode numbers of all the listening sockets, and the inodes of the
> open sockets for a process. Together, these utilities can tell us
> which sockets a process is listening on.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/network/ports.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/network/ports.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60495/diff/13/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26)
> 
> 
> Thanks,
> 
> James Peach
> 
>


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