]> git.proxmox.com Git - mirror_lxc.git/commit
cgmanager updates
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 3 Mar 2014 22:39:00 +0000 (16:39 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 4 Mar 2014 22:34:29 +0000 (17:34 -0500)
commit7e4dfe0bc1e715ccebca930939429aca25a17655
treefa9f6ba5b5c67573c0b624ed629aeff01b9a4527
parent5674a5bf3977aefa5f4acc811ea32e2f2326f3de
cgmanager updates

1. remove the cgm_dbus_disconnected handler.  We're using a proxy
   anyway, and not keeping it around.

2. comment most of the cgm functions to describe when they are called, to
   ease locking review

3. the cgmanager mutex is now held for the duration of a connection, from
   cgm_dbus_connect to cgm_dbus_disconnect.

3b. so remove the mutex lock/unlock from functions which are called during
   container startup with the cgmanager connection already up

4. remove the cgroup_restart().  It's no longer needed since we don't
   daemonize while we have the cgmanager socket open.

5. report errors and return early if cgm_dbus_connect() fails

6. don't keep the cgm connection open after cgm_ops_init.  I'm a bit torn
   on this one as it means that things like lxc-start will always connect
   twice.  But if we do this there is no good answer, given threaded API
   users, on when to drop that initial connection.

7. cgm_unfreeze and nrtasks: grab the dbus connection, as we'll never
   have it at that point.  (technically i doubt anyone will use
   cgmanager and utmp helper on the same host :)

8. lxc_spawn: make sure we only disconnect cgroups if they were already
   connected.

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