[Lxc-users] many veth interfaces hanging around postmortem

Daniel Lezcano daniel.lezcano at free.fr
Tue Feb 23 22:01:22 UTC 2010


C Anthony Risinger wrote:
> i'm not sure exactly how to reproduce this or whats happening, but while
> using my tools (vps-lxc) to test/generate container configs i notice that
> over time i get several stagnant veth interfaces that seem to not be cleaned
> up properly.  this is what i have running:
>
> $ vps-lxc ls dom
> dom   guest-private-cr                RUNNING
> dom   guest-private-mk              RUNNING
> dom   guest-service-http_proxy   RUNNING
> dom   host-service-email            RUNNING
>
> (that command basically just loops thru the domains and does an lxc-info on
> each one)  i only have 4 domains running/defined, three of them have 2
> interfaces, and the 4th only has one, so 7 interfaces total.  however in my
> brctl:
>
> $ brctl show
> bridge name     bridge id               STP enabled     interfaces
> br0             8000.000bdb92cf22       no              eth0
>                                                         vethrWDKp9
>                                                         vethw5rA8d
>                                                         vethKg5sKA
>                                                         vethiUXbg9
>                                                         veth6UWnZz
>                                                         vethcQzgNh
>                                                         vetha7wyPO
> dhcpbr0         8000.06452378c895       no              veth0oGNFm
>                                                         vethagpIpC
>                                                         vethTx7AAO
>                                                         vethLh2bHE
>                                                         veth2ctG5A
>                                                         vethqI1MjQ
>                                                         vethAad9n1
>                                                         veth2CPXrC
>
> there are 15 veth interfaces still up.  if i do an ifconfig i also see 15
> veth interfaces up.  if i do an "ifconfig -a" i see 23 veth interfaces up
> and down?  i'm using BTRFS so i've been generating templates like crazy, 1-x
> hundred, so i'm really not sure when or why it's happening at this point.
>  seems like the veth interface is not being removed from the bridge and thus
> can't be removed completely?  might be me, but seems like a bug; is anyone
> else noticing behavior like this?
>   

I noticed some veth are not removed on error. That may be your case, 
something I am investigating.
In the other hand, if you have some sockets in LAST_ACK, FIN_WAIT2, or 
other, they will prevent the network namespace to be destroyed as they 
grab a reference on it. The destruction will occurs some minutes later 
when the socket timers expire. This destruction triggers the network 
devices removal. If the interfaces are still there after 10 minutes, it 
is probable your are facing a bug in lxc.






More information about the lxc-users mailing list