]> git.ipfire.org Git - thirdparty/systemd.git/commit
machined: rework state tracking logic for machines 898/head
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Aug 2015 13:50:54 +0000 (16:50 +0300)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Aug 2015 13:54:00 +0000 (16:54 +0300)
commit49f3fffd94591bdf2bd6c2233a9300daeab79566
treee5e43f4adaa79a86e6cd808241a32f53746cf1be
parente5a840c93ac8a175a61fc5944d260127ff2247cc
machined: rework state tracking logic for machines

This splits up the stopping logic for machines into two steps: first on
machine_stop() we begin with the shutdown of a machine by queuing the
stop method call for it. Then, in machine_finalize() we actually remove
the rest of its runtime context. This mimics closely how sessions are
handled in logind.

This also reworks the GC logic to strictly check the current state of
the machine unit, rather than shortcutting a few cases, like for example
assuming that UnitRemoved really means a machine is gone (which it isn't
since Reloading might trigger it, see #376).

Fixes #376.
src/machine/machine.c
src/machine/machine.h
src/machine/machined-dbus.c
src/machine/machined.c