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

> Quoting Fajar A. Nugraha (l...@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.kis...@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
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to