[Lxc-users] Containers are all getting same IP address

Jay Taylor jay at jaytaylor.com
Sat Aug 10 22:40:39 UTC 2013


After further investigation yesterday, I am not convinced it is an
IP-address issue.  The affected host machines are unable to start any
existing or newly created containers.  The incident that triggered the
issue was cloning 1 container into 10 new ones, and then launching them all
simultaneously.  Are there any known concurrency issues with LXC which
would explain why executing a lot of clone/start LXC commands at the same
time causes all of LXC to be rendered useless until the host machine is
physically rebooted?


On Sat, Aug 10, 2013 at 11:42 AM, Tony Su <tonysu at su-networking.com> wrote:

> FYI
> I avoid the whole issue assigning different IP addresses by creating
> my br devices using libvirt (vm manager).
>
> Using vm manager, I can
> Create a <named> virtual network that references using the specified
> bridge device (all libvrit created bridge devices have a "virbr" name
> instead of "br")
> When you setup your bridge device using libvirt, you can configure a
> DHCP process for that virtual network without having to install and
> run a proper DHCP server.
>
> Once you create the bridge device using libvirt, it can be used by
> <any> virtualization technology, so for example although I'm not
> managing my LXC Containers using libvirt, the bridge devices are still
> usable by KVM, Xen, LXC and QEMU on my machine. Once the bridge device
> is created, just reference it in your LXC Container config file and
> from within the container your eth0 if setup for DHCP will
> automatically get its address.
>
> You can display the bridge devices that exist on your machine with the
> following command
> brctl show
>
> Although it's probably likely that a "regular" bridge device could be
> configured with DHCP and even be referenced by name, I find it so much
> easier and avoids mistakes to just use vm manager to do the work for
> me.
>
> HTH,
> Tony
>
>
>
>
> On Fri, Aug 9, 2013 at 7:32 PM, Serge Hallyn <serge.hallyn at ubuntu.com>
> wrote:
> > Sorry, I can't figure out what's going wrong.  You have unique macaddrs
> > for each container, so the dnsmasq-lxc should be handing out unique
> > ip addresses.  What does /etc/network/interfaces in one of the containers
> > look like?
> >
> >> ubuntu at ip-10-34-249-56:~$ lxc-version
> >> lxc version: 0.9.0
> >
> > what about
> >         dpkg -l | grep lxc
> > and
> >         dpkg -l | grep dnsmasq
> > ?
> >
> >
> ------------------------------------------------------------------------------
> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
> > It's a free troubleshooting tool designed for production.
> > Get down to code-level detail for bottlenecks, with <2% overhead.
> > Download for free and get started troubleshooting in minutes.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Lxc-users mailing list
> > Lxc-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130810/0199b82c/attachment.html>


More information about the lxc-users mailing list