]> git.ipfire.org Git - thirdparty/lxc.git/commit
fork off a task to delete ovs ports when done
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 14 Jan 2016 07:48:57 +0000 (07:48 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 28 Jan 2016 14:20:14 +0000 (15:20 +0100)
commitc43cbc040b83e4eef8d64c26a3636c48d6c5988b
treee79c1b29b75d13e52481f26e46504100a34bffba
parent23c9c64d50d0424ca49d86896a5f043abd26940b
fork off a task to delete ovs ports when done

The new task waits until the container is STOPPED, then asks
openvswitch to delete the port.

This requires two new arguements to be sent to lxc-user-nic.
Since lxc-user-nic ships with lxc, this shouldn't be a problem.

Finally when calling lxc-user-nic, use execlp insteac of execvp
to preserve lxcpath's const-ness.  Technically we are
guaranteed that execvp won't change the args, but it's worth
it to silence the warnings (and not hide real errors).

With this patch, container nics are cleaned up from openvswitch
bridges on shutdown.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/lxc_user_nic.c
src/lxc/network.c
src/lxc/network.h
src/lxc/start.c