> On Dec. 17, 2016, 11:28 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 1159-1170
> > <https://reviews.apache.org/r/54717/diff/4/?file=1588480#file1588480line1159>
> >
> >     Just curious in which case `getNetwork` will succeeds but 
> > `getNetworkConfigJSON()` will fail?
> 
> Avinash sridharan wrote:
>     One case I can think of is if the operator ends up removing the file 
> between a call to `getNetwork` and `getNetworkConfigJSON` . Highly unlikely, 
> but possible.

I do not think we need to handle the case like that. In `getNetwork`, you 
already call `getNetworkConfigJSON` if the `network` is in the hashmap 
`networkConfigs` and remove the `network` from `networkConfigs` if 
`getNetworkConfigJSON` fails, I think we do not need to duplicate such logic 
outside after `getNetwork` is called.


- Qian


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


On Dec. 18, 2016, 10:23 a.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54717/
> -----------------------------------------------------------
> 
> (Updated Dec. 18, 2016, 10:23 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-6567
>     https://issues.apache.org/jira/browse/MESOS-6567
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If the `network/cni` isolator sees a cache-miss during the `prepare`
> phase, it will try to look for the CNI network on disk before giving
> up. This allows for the dynamic addition of CNI networks without the
> need for agent restart.
> 
> During `isolate` or `prepare` if for a given network, the isolator is
> unable to read the corresponding configuration file, or finds and
> error in the existing configuration file, it will remove the network
> from the in-memory cache. This allows dynamic deletion of CNI
> configurations from the `network/cni` isolator.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> b8fc755a8dd4757d904f7e97a71d3cf7f29d2033 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ddb4d33e9ecd0ffd118e8e68cb7ec90346b08049 
> 
> Diff: https://reviews.apache.org/r/54717/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> Manual testing with addition of a non-existent CNI configuration.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>

Reply via email to