[lxc-devel] [lxc/lxc] c43cbc: fork off a task to delete ovs ports when done

GitHub noreply at github.com
Thu Jan 28 14:20:24 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: c43cbc040b83e4eef8d64c26a3636c48d6c5988b
      https://github.com/lxc/lxc/commit/c43cbc040b83e4eef8d64c26a3636c48d6c5988b
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2016-01-28 (Thu, 28 Jan 2016)

  Changed paths:
    M src/lxc/conf.c
    M src/lxc/conf.h
    M src/lxc/lxc_user_nic.c
    M src/lxc/network.c
    M src/lxc/network.h
    M src/lxc/start.c

  Log Message:
  -----------
  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 at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>




More information about the lxc-devel mailing list