-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52375/
-----------------------------------------------------------
Review request for mesos and Jie Yu.
Bugs: MESOS-6269
https://issues.apache.org/jira/browse/MESOS-6269
Repository: mesos
Description
-------
For new network namespaces, pods expect the loop back interface to be
up and the `localhost` to point to this loopback. The loopback
interface is created when a new network namespace is created it is not
brought up. Hence, when a new network namespace is created we
associate a `pre_exec_command` with the container creating this new
network namespace to bring up the loopback. Currently the
`pre_exec_command` is set to "ifconfig lo up".
Diffs
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
bd012d6a6736f5427c9ddffddaca9f0a74ff9b6a
Diff: https://reviews.apache.org/r/52375/diff/
Testing
-------
Ran pods against a CNI network using `mesos-execute`. Then checked the network
interfaces created in the new network namespace and verified that the loopback
interface is up:
vagrant@mesos-dev:~/mesosphere/mesos$ sudo ip netns exec mesos ifconfig
eth0 Link encap:Ethernet HWaddr 0a:58:c0:a8:00:0b
inet addr:192.168.0.11 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::5059:e9ff:fe21:c01c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3466 (3.4 KB) TX bytes:4365 (4.3 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Thanks,
Avinash sridharan