Comment 32 for bug 1357252

Revision history for this message
James Hunt (jamesodhunt) wrote : Re: Upstart jobs specifying cgroup fail to start occasionally

After a lot of testing, I think I've found the cause - when lightdm starts the session init, logind is supposed to setup the cgroups. But that isn't happening.

Normally, logind would do that by asking systemd, but in our case it talks to systemd-shim. sytemd-shim then asks cgmanager to create the cgroups. However, currently systemd-shim does not fail if cgmanager cannot be contacted. So I think the proper fix is to change systemd-shim to either block or fail hard if cgmanager is not contactable or unable to create the requested cgroups. It would also be beneficial to arrange for systemd-shim output to be captured since currently all stdout and stderr is discarded when it is run via /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.

A "quick fix" however is to change dbus's 'start on' condition to ensure it doesn't start until cgmanager is ready. The simplest fix being:

$ echo "start on cgmanager-ready" | sudo tee -a /etc/init/dbus.override