[Lxc-users] veth interface not deleted?

Fajar A. Nugraha list at fajar.net
Wed Nov 6 06:16:06 UTC 2013


On Tue, Oct 1, 2013 at 4:46 AM, Serge Hallyn <serge.hallyn at ubuntu.com>wrote:

> Quoting Fajar A. Nugraha (list at fajar.net):
>
>
> Would injecting tcp rst really be necessary? In my test, doing "ip link
> > del" on the host side of the interface ALWAYS succeed, no matter what the
> > state the guest container's interface is.
> >
> > Serge, do you have the particular commit ids for
> "lxc.network.script.down"
> > support? Backporting that would probably be the best step for me to try.
>
> commit 74a2b5864f2ece87bf522d1c1cbd590dc24c0c53
> Author: Jan Kiszka <jan.kiszka at siemens.com>
> Date:   Mon Jul 9 19:15:48 2012 +0200
>
>     Add network-down script
>
>

A follow up to this issue, I found out that the lxc package from
ubuntu-lxc/stable (1.0.0~alpha2+) can't be use as-is on current LTS
(precise) due to various issues (e.g. apparmor problem, containers detected
as not started if started automatically on boot but behaves correctly when
started manually, etc) which I haven't had time to track further.

As a workaround, I've created a ppa with lxc from precise-backports
(0.8.0~rc1+), plus the above patch, on
https://launchpad.net/~ubuntu-ppa/+archive/lxc-lts

I then use this on container's config file:
lxc.network.veth.pair=v-c1-e0
lxc.network.script.down = /var/lib/lxc/c1/network_down.sh

... and the script contains this
#!/bin/bash
/sbin/ip link del v-c1-e0 || /bin/true

Tested with:
- lxc-start
- lxc-stop, then lxc-start again
- "reboot -f" inside the container

Not ideal, but acceptable for my needs.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20131106/66a1a334/attachment.html>


More information about the lxc-users mailing list