> On March 25, 2016, 8:20 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, line 438
> > <https://reviews.apache.org/r/44706/diff/3/?file=1311930#file1311930line438>
> >
> > Why do you need to get os::environment()?
The reason is, CNI plugin needs to call `iptables` to set up IPMasq, if we do
not do this, the plugin will fail with an error:
{
"code": 100,
"msg": "failed to locate iptables: exec: \"iptables\": executable file
not found in $PATH"
}
Maybe we could explicitly set `$PATH` as
`/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` rather than call
`os::environment()`?
> On March 25, 2016, 8:20 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 464-472
> > <https://reviews.apache.org/r/44706/diff/3/?file=1311930#file1311930line464>
> >
> > We cannot read stdout and stderr after the process has finished. THis
> > is becasuse the PIPE size is bounded. If the subprocess writes a lot of
> > data, the write will block if there's no reader.
> >
> > Please follow the same pattern in:
> >
> > https://github.com/apache/mesos/blob/master/src/uri/fetchers/curl.cpp#L98
Agree. However I see there are other code doing it as well, e.g.,
https://github.com/apache/mesos/blob/0.28.0/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp#L3173:L3199
https://github.com/apache/mesos/blob/0.28.0/src/docker/docker.cpp#L153:L173
Maybe we need to fix them as well?
- Qian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44706/#review125367
-----------------------------------------------------------
On March 23, 2016, 10:22 p.m., Qian Zhang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44706/
> -----------------------------------------------------------
>
> (Updated March 23, 2016, 10:22 p.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/CMakeLists.txt 0bd7a978306488b687a7e2eeeb8a5c9766d43548
> src/Makefile.am 6552e48eab2708a28dd69adba3ec759cb5aeca4c
> src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
> 3878a7e85fe24175b3bd5e3a6268cf32a07f2d8b
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
> 9552312f9ba1e4df6564cfb737cc41e041cf4407
> src/slave/containerizer/mesos/isolators/network/cni/paths.hpp PRE-CREATION
> src/slave/containerizer/mesos/isolators/network/cni/paths.cpp PRE-CREATION
>
> Diff: https://reviews.apache.org/r/44706/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Qian Zhang
>
>