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 45092: Fixed containerizer potential race destroy while provisioning.
Date Wed, 23 Mar 2016 00:14:53 GMT

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




src/slave/containerizer/mesos/containerizer.cpp (lines 714 - 722)
<https://reviews.apache.org/r/45092/#comment187596>

    Maybe you can do the following to simplify the code here:
    ```
    Future<ProvisionInfo> future =
      provisioner->provision(containerId, image);
    
    container->provisionInfos.push_back(future);
    
    return future.then(...);
    ```
    
    In `_launch`:
    
    ```
    container->provisionInfos.push_back(future);
    ...
    return collect(futures).then(...);
    ```
    
    In `destroy`:
    
    ```
    await(container->provisionInfos)
      .onAny(...);
    ```



src/slave/containerizer/mesos/containerizer.cpp (line 811)
<https://reviews.apache.org/r/45092/#comment187595>

    Irrelevant to this ticket, but this might be related to the segfault described in https://issues.apache.org/jira/browse/MESOS-5008.
    
    We should use
    ```
    .then(defer(self(), [=]() -> Future<bool>
    ```


- Jie Yu


On March 21, 2016, 5:51 a.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45092/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 5:51 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Jie Yu, Shuai Lin, and Timothy Chen.
> 
> 
> Bugs: MESOS-4985
>     https://issues.apache.org/jira/browse/MESOS-4985
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed containerizer potential race destroy while provisioning.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.hpp 3ef6a6752a6656e97be9f48bd4d2d060d1f9cb46

>   src/slave/containerizer/mesos/containerizer.cpp ee7a265975323ca891114a286357c8e42901560c

>   src/tests/containerizer/mesos_containerizer_tests.cpp f3ca32b2d8b8ef9dcfa8f20d9ceaff48b6598a66

> 
> Diff: https://reviews.apache.org/r/45092/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>


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