[lxc-devel] Subject=Re: lxc-1.0.0 reboot error

Daniel Lezcano daniel.lezcano at free.fr
Mon Jun 23 16:17:20 UTC 2014


On 06/23/2014 05:26 PM, Ilya Plenne wrote:
> Hi. I don't know, but it seems  that here are the best place for my
 > report. I reproduce this issue twice for today. I have ubuntu 14.04
 > with lxc 1.0.3-0ubuntu3. 1. lxc-create -t ubuntu -n test -- -r
 > precise 2. Add lxc.network.veth.pair = vethtest0 to container config.
 >  3. Reboot host node. (maybe it's not reaaly needed)

right, not needed.

> 4. Run containter with  lxc-start -n test 5. And try to reboot it
 >
 > I get following errors: lxc-start: failed to create
 > vethtest0-veth1EXFR2 : File exists lxc-start: failed to create
 > netdev lxc-start: failed to create the network lxc-start: failed to
 > spawn 'test'
 >
 > And after that it's not started. But, if I try to lxc-start this
 > containter, it starts perfectly. So, to reboot continer you need to
 > poweroff it through reboot or poweroff, does not matter, and after
 > that manually boot it. So I don't know what is real bug, but i try
 > explained how to reproduce It, and maybe it helps a lot.

I think what is happening is the following:

The destruction of the veth pair devices is not instantaneous, it 
depends on the network activity you had in the container, especially 
with the TCP protocol.
Any pending packets will get a reference to the network namespace for a 
while, thus preventing its destruction with the network device 
associated with it.
So if the container is restarted immediately, it will try to recreate 
the vethtest0 which may be still existing in the name space.

A couple of solutions:

1. remove the ....pair=vethtest0 line in the config file

or

2. switch to the macvlan configuration

Hope that helps

   -- Daniel


More information about the lxc-devel mailing list