[ 
https://issues.apache.org/jira/browse/YARN-9003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16728938#comment-16728938
 ] 

Zac Zhou commented on YARN-9003:
--------------------------------

I'm not sure whether --net can specify multiple networks. 

I tried bridge and calico network, it looks like only one network take effects:

What I got is as follows:
h6. bridge only

 
{code:java}
 docker run -it --net=bridge --name c1 --rm busybox 
/ # ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:AC:12:00:02 
inet addr:172.18.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe12:2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:418 (418.0 B) TX bytes:508 (508.0 B)
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:1 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
{code}
 
h6. calico only

 
{code:java}
docker run -it --net=calico-network --name c1 --rm busybox 
/ # ifconfig
cali0 Link encap:Ethernet HWaddr EE:EE:EE:EE:EE:EE 
inet addr:192.20.24.39 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: fe80::ecee:eeff:feee:eeee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:418 (418.0 B) TX bytes:258 (258.0 B)
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:1 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
{code}
 
h6. Both calico and bridge

 
{code:java}
docker run -it --net=bridge --net=calico-network --name c1 --rm busybox 
/ # ifconfig
cali0 Link encap:Ethernet HWaddr EE:EE:EE:EE:EE:EE 
 inet addr:192.20.24.41 Bcast:0.0.0.0 Mask:255.255.255.255
 inet6 addr: fe80::ecee:eeff:feee:eeee/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:6 errors:0 dropped:0 overruns:0 frame:0
 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:0 
 RX bytes:508 (508.0 B) TX bytes:418 (418.0 B)
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:1 
 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
{code}
 

Should we use "docker network connect" instead?

 

> Support multi-homed network for docker container
> ------------------------------------------------
>
>                 Key: YARN-9003
>                 URL: https://issues.apache.org/jira/browse/YARN-9003
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Major
>              Labels: docker
>         Attachments: YARN-9003.001.patch, YARN-9003.002.patch
>
>
> Docker network can be defined as configuration properties - docker.network to 
> setup docker container to connect to a specific network in YARN service.  
> Docker can run multi-homed network by specifying --net=bridge 
> --net=private-net.  This is useful to expose small number of  front end 
> container and ports, while the rest of the infrastructure runs in private 
> network.  This task is to add support for specifying multiple docker networks 
> to YARN service and docker support.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to