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




src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp (lines 134 - 138)
<https://reviews.apache.org/r/49827/#comment208079>

    Why are they virtual methods?



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 581 - 585)
<https://reviews.apache.org/r/49827/#comment208091>

    I think you need to call `onAny()` rather than `then()`, so these codes 
should be changed to:
    ```
      return collect(cleanups)
        .onAny(defer(
            PID<CgroupsIsolatorProcess>(this),
            &CgroupsIsolatorProcess::_cleanup,
            containerId,
            lambda::_1));
    ```
    You can take a look at the following code as a reference:
    
https://github.com/apache/mesos/blob/1.0.0-rc2/src/linux/cgroups.cpp#L1648:L1649



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (line 593)
<https://reviews.apache.org/r/49827/#comment208090>

    I think you need to check `!isReady()` rather than `isFailed()`.



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 615 - 617)
<https://reviews.apache.org/r/49827/#comment208092>

    Can we merge these 3 lines into the code below?
    ```
    .then([]() { return Nothing(); });
    ```



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 632 - 635)
<https://reviews.apache.org/r/49827/#comment208093>

    I think these code should be formated to:
    ```
        return Failure(
            "Failed to clean up container '" + stringify(containerId) +
            "': " + (future.isFailed() ? future.failure() : "discarded"));
    ```


- Qian Zhang


On July 15, 2016, 11:33 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49827/
> -----------------------------------------------------------
> 
> (Updated July 15, 2016, 11:33 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Jie Yu, Qian Zhang, and Zhengju Sha.
> 
> 
> Bugs: MESOS-5041
>     https://issues.apache.org/jira/browse/MESOS-5041
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented `CgroupsIsolatorProcess::cleanup`.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp 
> c57baec88437f68886702a40ec8a6a6458546119 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 
> 4a9f55bf3b217405bf90943f27a976422877a99e 
> 
> Diff: https://reviews.apache.org/r/49827/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to