[lxc-users] lx-start taking a long time if veth is not added to lxcbr0Š

Anjali Kulkarni anjali at juniper.net
Thu Oct 2 23:20:29 UTC 2014


Hi All,

What I found was that if I keep lxcbr0, but add more bridges, it works and
boots fine(very quickly).
Eg.
 
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:dc:33:4e

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br-int
lxc.network.ipv4 = 172.16.0.2
lxc.network.hwaddr = 00:0a:0e:cd:13:1e
 

I created the ubuntu container using lxc-create -t ubuntu. It looks like
lxcbr0 is created in the background and perhaps if it does not find it,
there is a problem?
Is there any way to get rid of lxcbr0? I really don't want that bridge
name, but want to use my own..

Thanks,
Anjali
 


On 10/2/14 11:50 AM, "Anjali Kulkarni" <anjali at juniper.net> wrote:

>Thanks Guido, very good point! I don't know where that other MAC is coming
>from.
>Also, lxcbr0 works, that is boots quickly, so something is different about
>br-int.
>However, looking at the console logs, just shows it hangs (waits for a
>long time) after the statement:
>* Starting Bridge socket events into upstart   ...done.
>
>
>Are there any other logs I can look at for the dhcp or dnsmasq stuff?
>Also, it seems that the container interfaces file is coming from the
>host's /etc/netowrk/interface, and is completely ignoring the IP and other
>static info I supply in the container's config file - is this expected?
>
>Anjali
>
>On 10/1/14 11:50 PM, "Jäkel, Guido" <G.Jaekel at dnb.de> wrote:
>
>>Dear Anjali,
>>
>>i noticed that in your posted snippets, there are different MACs for
>>what's you're want to use to get the IP from the DHCP-daemon and the one
>>the Containers veth got.
>>
>>you wrote
>>><ip address="172.16.0.3" netmask="255.255.0.0">
>>>    <dhcp>
>>>      <host ip="172.16.0.1" mac="0A:00:DE:C0:DE:01" name="vRE" />
>>>    </dhcp>
>>>
>>> I added the foll. Line to br-int, but does not help:
>>>
>>><host ip="172.16.0.2" mac="00:16:3e:d9:c0:ce" name="vpfe" />
>>
>>and 
>>
>>> # Network configuration
>>> lxc.network.type = veth
>>> lxc.network.link = br-int
>>> lxc.network.ipv4 = 172.16.0.2
>>> lxc.network.name = eth0
>>> lxc.network.flags = up
>>> lxc.network.hwaddr = 00:16:3e:d9:c0:ce
>>
>>
>>but in your Container, you see another MAC.
>>
>>>ubuntu at vpfe:~$ ifconfig eth0
>>>eth0      Link encap:Ethernet  HWaddr 00:16:3e:4c:45:ae
>>>          inet addr:172.16.0.2  Bcast:172.255.255.255  Mask:255.0.0.0
>>
>>
>>I guess that's the reason why the containers DHCPD-client still wait
>>until timeout. Maybe you should take a look at the containers console log
>>while startup to clarify where the intermission occurs.
>>
>>Greetings
>>
>>Guido
>>>-----Original Message-----
>>>From: lxc-users [mailto:lxc-users-bounces at lists.linuxcontainers.org] On
>>>Behalf Of Anjali Kulkarni
>>>Sent: Wednesday, October 01, 2014 11:38 PM
>>>To: LXC users mailing-list
>>>Subject: Re: [lxc-users] lx-start taking a long time if veth is not
>>>added to lxcbr0Š
>>>
>>>Veth interface does get added to the br-int. It gets the IP 172.16.0.2
>>>that it was given in the config file. On the container ifconfig eth0
>>>shows:
>>>
>>>ubuntu at vpfe:~$ ifconfig eth0
>>>eth0      Link encap:Ethernet  HWaddr 00:16:3e:4c:45:ae
>>>          inet addr:172.16.0.2  Bcast:172.255.255.255  Mask:255.0.0.0
>>>
>>>
>>>
>>>I can ping from host to the container eth0 172.16.0.2.
>>>However, I am using a combination of libvirt for the br-int bridge and
>>>adding the entry manually in the /var/lib/lxc/$lxc_name/config file (not
>>>using libvirt to start the lxc)- is this causing some conflicts/issues?
>>>
>>>Anjali
>>>
>>>On 10/1/14 2:21 PM, "Serge Hallyn" <serge.hallyn at ubuntu.com> wrote:
>>>
>>>>If it takes  along time to boot then it likely isn't
>>>>getting an ip address from dnmasq.  Now last I checked
>>>>br-int does have a dnsmasq running, but double-check that.
>>>>You can lxc-attach to the container and manually do
>>>>sudo dhclient eth0
>>>>
>>>>This is assuming that you are on a new enough lxc so that
>>>>the other veth endpoint is in fact being attached to br-int.
>>>>Which version are you using?
>>>>
>>>>Quoting Anjali Kulkarni (anjali at juniper.net):
>>>>> Hi,
>>>>>
>>>>> I notice that If I add my beth link to any other bridge except
>>>>>lxcbr0,
>>>>>my ubuntu container takes a really long time to boot up, and seems to
>>>>>hang/wait for a long time after this statement:
>>>>>  * Starting Bridge socket events into upstart   ...done.
>>>>>
>>>>> My config file is:
>>>>>
>>>>> ŠŠ.
>>>>> # Network configuration
>>>>> lxc.network.type = veth
>>>>> lxc.network.link = br-int
>>>>> lxc.network.ipv4 = 172.16.0.2
>>>>> lxc.network.name = eth0
>>>>> lxc.network.flags = up
>>>>> lxc.network.hwaddr = 00:16:3e:d9:c0:ce
>>>>>
>>>>> I found out, that if I keep
>>>>> lxc.network.link = lxcbr0
>>>>> Instead of
>>>>> lxc.network.link = br-int
>>>>>
>>>>> It boots up really fast.
>>>>> Is there any way to get around this? I don't want to add the veth
>>>>>interface to lxcbr0, but to br-int..
>>>>>
>>>>> Anjali
>>>>>
>>>>
>>>>> _______________________________________________
>>>>> lxc-users mailing list
>>>>> lxc-users at lists.linuxcontainers.org
>>>>> http://lists.linuxcontainers.org/listinfo/lxc-users
>>>>
>>>>_______________________________________________
>>>>lxc-users mailing list
>>>>lxc-users at lists.linuxcontainers.org
>>>>http://lists.linuxcontainers.org/listinfo/lxc-users
>>>
>>>_______________________________________________
>>>lxc-users mailing list
>>>lxc-users at lists.linuxcontainers.org
>>>http://lists.linuxcontainers.org/listinfo/lxc-users
>>_______________________________________________
>>lxc-users mailing list
>>lxc-users at lists.linuxcontainers.org
>>http://lists.linuxcontainers.org/listinfo/lxc-users
>
>_______________________________________________
>lxc-users mailing list
>lxc-users at lists.linuxcontainers.org
>http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list