]> git.ipfire.org Git - thirdparty/lxc.git/commit
cgfsng: fix reboots when using dbus 4628/head
authorSerge Hallyn <serge@hallyn.com>
Tue, 23 Dec 2025 19:56:31 +0000 (13:56 -0600)
committerSerge Hallyn <serge@hallyn.com>
Tue, 23 Dec 2025 19:56:31 +0000 (13:56 -0600)
commit0f5852edfad06fe4e9f00aaddd3d93576269729e
tree8d738b6cb40a4d45a3bd121c648b81dcf0a4f7c6
parent1311e1b47d9bbef9561b81eb8ebfa016b1a84087
cgfsng: fix reboots when using dbus

When using dbus on a systemd system, we ask systemd to create a
"scope" for us to run in.  We send a dbus message, and wait
for the reply saying it is created.

When we reboot, we were re-sending the request to create the
scope.  However, the scope still exists, because or single
lxc-monitor (originally lxc-start) thread is still under the
'lxc.pivot' sub-directory of the scope.

But, on reboot, our lxc_conf already has our scope recorded!
So, just check whether that is set, and skip scope creation
if so.

With this patch, i can reboot ad nauseum with no apparent
problems.

We could probably move this check to the top of the function,
but for now this fixes the bug.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
src/lxc/cgroups/cgfsng.c