[Lxc-users] Control panel

Daniel Lezcano daniel.lezcano at free.fr
Mon Apr 18 17:40:42 UTC 2011


On 04/17/2011 09:47 AM, Ulli Horlacher wrote:
>
> I will integrate the other lxc basic commands as soon the phys nic
> renaming bug is solved.

The bug is coming from the kernel and the network namespace life cycle.

When the network namespace dies, the physical nic is moved back to the 
host. Unfortunately, the last process of the container can exit making 
lxc to rename 'devX' to the original name but that may fail because the 
network namespace could be still alive. That happens, for example, when 
there are TCP orphan sockets waiting for a timer to expire before being 
destroyed (FIN_WAIT1, FIN_WAIT2, ...). So the physical network device 
may be moved back after lxc exits, leading to the network device name 
inconsistency.

I think the problem should be solved from the kernel, because it renames 
the netdev to devX when there is a name collision.
As we changed the name 'eth1' in the host to 'eth0' in the container, 
when the container exits, the kernel detect the conflict name with the 
'eth0' from the host and rename container's 'eth0' to 'dev%d'.
As a workaround, I think setting lxc.network.name = eth1 in the 
container should fix the problem (assuming /etc/network/interfaces file 
is modified for this name). So no name conflict will appear when the 
container exits.

I will dig to push in the mainstream kernel a fix but I am not sure that 
will be accepted.

Thanks
   -- Daniel




More information about the lxc-users mailing list