> On March 11, 2016, 6:45 p.m., Avinash sridharan wrote:
> > src/slave/containerizer/mesos/isolators/network/cni.cpp, line 358
> > <https://reviews.apache.org/r/44706/diff/1/?file=1295806#file1295806line358>
> >
> >     If we block here, it will lock the isolator, and prevent the 
> > `MesosContainerizer` from launching any more containers?
> 
> Qian Zhang wrote:
>     I do not think it will prevent `MesosContainerizer` from launching any 
> more containers. Please take a look at: 
> https://github.com/apache/mesos/blob/0.27.2/src/slave/containerizer/mesos/containerizer.cpp#L945:L1034,
>  the whole code to call launcher to fork executor process and call isolator's 
> `isolate()` are already in a `defer()` as a lambda, and it is also a very big 
> lambda.
> 
> Avinash sridharan wrote:
>     Hi Qian,
>      Didn't understand your comment. Are you implying calling `await` on the 
> `Future` won't block?
> 
> Qian Zhang wrote:
>     I think it will not block `MesosContainerizerProcess`, but it will indeed 
> block `NetworkCniIsolatorProcess`. So yes, I agree we should use `defer`. And 
> I have another question, for the container which want to join multiple 
> networks, do we want to call plugin to join multiple networks in parallel or 
> sequentially? I think joining one network should be independent on joining 
> another, but if we do them in parallel, I am afraid that user may see "`eth2, 
> eth0, eth1`" rather than "`eth0, eth1, eth2`" in the container. Please let me 
> know your thought :-)
> 
> Qian Zhang wrote:
>     Second thought: since one libprocess can only handle one event at a time, 
> I think container has to join multiple networks sequentially, so we do not 
> need to worry about the interface names may be disordered.

You don't need to force the container to join multiple networks sequentially. 
You can invoke multiple calls to the plugin (each being a subprocess) and then 
use `collect` or `await` to aggregate the futures. 

Since we are supporting an all or none behavior, in terms of containers joining 
CNI networks, we could possibly use `collect`. 

https://github.com/apache/mesos/blob/fcc6f95499559e55ebe6b0a5c5ca0665ad5c7742/3rdparty/libprocess/include/process/collect.hpp#L38


- Avinash


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


On March 16, 2016, 7:50 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44706/
> -----------------------------------------------------------
> 
> (Updated March 16, 2016, 7:50 a.m.)
> 
> 
> Review request for mesos, Avinash sridharan, Gilbert Song, and Jie Yu.
> 
> 
> Bugs: MESOS-4759
>     https://issues.apache.org/jira/browse/MESOS-4759
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented isolate() method of "network/cni" isolator.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/network/cni.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/network/cni.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/44706/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>

Reply via email to