<div dir="ltr">docker is now not using lxc libraries, you want to check the new version perhaps?<div><br></div><div>Alvaro.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 12, 2014 at 3:33 PM, Nakayama Kenjiro <span dir="ltr"><<a href="mailto:nakayamakenjiro@gmail.com" target="_blank">nakayamakenjiro@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I tried to set up multiple veth and default GW for each veth in one container[1] by using docker with following command [2].<br>
But I got an error[3]. (When I setup with only one Default GW, it works well. So I think I can not default GW for each veth (eth0, eth1).)<br>

<br>Is this my mis-configuration or lxc's bug?<br>Can anybody figure out the cause of this problem?<br><br>Thank you in advance.<br><br>Kenjiro<br><br>[1]<br>     +-----------------+ Default GW<br>     | +-------------+ | +-------+<br>


     | |    veth0    | | |  br1  |<br>     | |172.16.42.20 |-|-|docker1|--<br>     | +-------------+ | +-------+<br>     |                 |<br>     |                 | Default GW<br>     | +-------------+ | +-------+<br>


     | |    veth1    | | |  br2  |<br>     | |172.16.42.20 |-|-|docker2|--<br>     | +-------------+ | +-------+<br>     +-----------------+<br><br>[2] docker execute command.<br>docker run \<br>-n=false \<br>-lxc-conf="lxc.network.type = veth" \<br>


-lxc-conf="<a href="http://lxc.network.name" target="_blank">lxc.network.name</a> = eth0" \<br>-lxc-conf="lxc.network.ipv4 = <a href="http://172.16.42.20/24" target="_blank">172.16.42.20/24</a>" \<br>

-lxc-conf="lxc.network.ipv4.gateway = 172.16.42.1" \<br>
-lxc-conf="lxc.network.hwaddr = 00:FF:80:FF:FF:02" \<br>-lxc-conf="lxc.network.link = docker1" \<br>-lxc-conf="lxc.network.flags = up" \<br>-lxc-conf="lxc.network.type = veth" \<br>


-lxc-conf="<a href="http://lxc.network.name" target="_blank">lxc.network.name</a> = eth1" \<br>-lxc-conf="lxc.network.ipv4 = <a href="http://172.16.42.21/24" target="_blank">172.16.42.21/24</a>" \<br>

-lxc-conf="lxc.network.hwaddr = 00:FF:80:FF:FF:01" \<br>
-lxc-conf="lxc.network.ipv4.gateway = 172.16.42.2" \<br>-lxc-conf="lxc.network.link = docker2" \<br>-lxc-conf="lxc.network.flags = up" \<br>-i -t --name tmp1 mptcp-test /bin/bash<br><br>[3] Error when executed docer run.<br>


~~~<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>


Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>


Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>


Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>


Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>Warning: '-lxc-conf' is deprecated, it will be removed soon. See usage.<br>lxc-start: failed to setup ipv4 gateway for 'eth1': File exists<br>


lxc-start: failed to setup netdev<br>lxc-start: failed to setup the network for '41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: failed to setup the container<br>lxc-start: invalid sequence number 1. expected 2<br>


lxc-start: failed to spawn '41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpuset/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>


lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpu,cpuacct/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/memory/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>


lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/devices/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/freezer/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>


lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/net_cls/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/blkio/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>


lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/perf_event/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/hugetlb/lxc/41794d153bafe7dc14dcc28520ff9f82b432ffcaed91572b6414d785d60db0dc'<br>


[error] client.go:2298 Error getting size: bad file descriptor<br>~~~<br><br>[4] Bridge setting<br>~~~<br>#!/bin/sh<br><br># Name of the bridge<br>FIRST_BRIDGE_NAME=docker1<br><br># Bridge address<br>FIRST_BRIDGE_ADDRESS=<a href="http://172.16.42.1/24" target="_blank">172.16.42.1/24</a><br>


<br># Add the docker1 bridge<br>brctl addbr $FIRST_BRIDGE_NAME<br><br># Set up the IP for the docker1 bridge<br>ip a add $FIRST_BRIDGE_ADDRESS dev $FIRST_BRIDGE_NAME<br><br># Activate the bridge<br>ip link set $FIRST_BRIDGE_NAME up<br>


<br>### ----------------------- ###<br><br># Name of the bridge<br>SECOND_BRIDGE_NAME=docker2<br><br># Bridge address<br>SECOND_BRIDGE_ADDRESS=<a href="http://172.16.42.2/24" target="_blank">172.16.42.2/24</a><br><br># Add the docker1 bridge<br>


brctl addbr $SECOND_BRIDGE_NAME<br><br># Set up the IP for the docker2 bridge<br>ip a add $SECOND_BRIDGE_ADDRESS dev $SECOND_BRIDGE_NAME<br><br># Activate the bridge<br>ip link set $SECOND_BRIDGE_NAME up<br>~~~<span class="HOEnZb"><font color="#888888"><br>
<br clear="all">

<br>-- <br><div dir="ltr">Kenjiro NAKAYAMA <<a href="mailto:nakayamakenjiro@gmail.com" target="_blank">nakayamakenjiro@gmail.com</a>><br>GPG Key fingerprint = ED8F 049D E67A 727D 9A44  8E25 F44B E208 C946 5EB9<br></div>



</font></span></div>
<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>