]> git.proxmox.com Git - mirror_corosync.git/commit
init: Enable StopWhenUnneeded v3.0.1
authorJan Pokorný <jpokorny@redhat.com>
Fri, 14 Dec 2018 20:07:37 +0000 (21:07 +0100)
committerJan Friesse <jfriesse@redhat.com>
Fri, 11 Jan 2019 08:49:35 +0000 (09:49 +0100)
commit03d9321bc80887d4578744c26c05d61e2d9d4278
treeb31fd9771e68f5989377893a01575c90b15e96d9
parent2ab4d4188670356dcb82a80f2fc4598f5145c77d
init: Enable StopWhenUnneeded

It shall be a rule of thumb not to combine "application stack"
components run under particular init/supervision mechanism and
run by whatever other means (without transitive relationships
like when corosync's client runs from other pacemaker that is
itself started through systemd) when there's a directed graph
of reliance between them (sans constrained corner cases like
when of such components is a kernel module).

And corosync on its own is just a service provider that only
appears useful when utilized as a basic building block for
application specific distributed environments.

Therefore, we may assume whenever corosync gets started by the
means of systemd, it's because of a mechanized attempt to satisfy
declared dependency of some such corosync's client that is about
to be started under the service manager realms (directly or, by
induction, through the same triggering mechanism indirectly).
Hence, when there's no such client around anymore (unless
this dependant is being restarted at the moment, see below)
corosync shall rather shutdown as well.

In the past, there was an issue with systemd regarding said
inflicted restart of the dependant/client, but that's resolved
as of v236:
https://github.com/systemd/systemd/commit/
deb4e7080db9dcd2a1d51ccf7c357f88ea863e54

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
init/corosync.service.in