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




src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 174)
<https://reviews.apache.org/r/45954/#comment191531>

    s/CniSetupContainer/NetworkCniIsolatorSetup/



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 178)
<https://reviews.apache.org/r/45954/#comment191529>

    insert a new line above



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 185)
<https://reviews.apache.org/r/45954/#comment191547>

    s/hosts/etc_hosts_path/
    
    we use snake_case for flag names.



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 186)
<https://reviews.apache.org/r/45954/#comment191548>

    etc_hostname_path



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 187)
<https://reviews.apache.org/r/45954/#comment191550>

    etc_resolv_conf



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 197)
<https://reviews.apache.org/r/45954/#comment191533>

    insert a new line above.



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 198)
<https://reviews.apache.org/r/45954/#comment191535>

    Please stick to our style guide by moving '{' to the next line.



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (lines 198 - 201)
<https://reviews.apache.org/r/45954/#comment191592>

    We don't have to put that in the member field. Let's just create local 
variables in 'execute()'



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 1117)
<https://reviews.apache.org/r/45954/#comment191591>

    Instead of using 1 and 0, can we replace them with EXIT_SUCCESS AND 
EXIT_FAILURE



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 1151)
<https://reviews.apache.org/r/45954/#comment191594>

    s/NOTE/TODO/



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 1161 - 1166)
<https://reviews.apache.org/r/45954/#comment191595>

    Do you want to check the result of 'mount' here?



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 1168 - 1188)
<https://reviews.apache.org/r/45954/#comment191597>

    Why do you need to read the mount table? Does seem to be necessary to me.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 1235 - 1239)
<https://reviews.apache.org/r/45954/#comment191581>

    Let's do ll the sanity checks before we actually doing the work.
    
    Also, can we do the setns together in one place. I would suggest not 
splitting into 'hostname' and 'mount' helpers. Let's just put all logics in 
'execute'.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 1281 - 1287)
<https://reviews.apache.org/r/45954/#comment191598>

    We cannot bindly call os::touch here. Let's just assume the mount point 
exists for now (just do os::exists check).


- Jie Yu


On April 9, 2016, 5:46 p.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45954/
> -----------------------------------------------------------
> 
> (Updated April 9, 2016, 5:46 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
>     https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `subcommand` allow configuring the container hostname and setting
> up network files in the container such as /etc/hosts, /etc/hostname,
> /etc/resolv.conf. This will allow for correct name to IP resolution
> within the container network namespace.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 654137c552a7c416f394365e43ea80770fe1ef8d 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 159152a01b68a667dbd57fa6452c6c2a3422787c 
> 
> Diff: https://reviews.apache.org/r/45954/diff/
> 
> 
> Testing
> -------
> 
> make
> 
> * Ran mesos_execute along with a single master/slave setup to verify that the 
> container joins the CNI network and the hostname and /etc/hosts, 
> /etc/resolv.conf are setup correctly.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>

Reply via email to