From 74c4bd6b1a0e3936d982f6bb729ceb3408c81a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Jun 2022 13:14:37 +0200 Subject: [PATCH] units: add IgnoreOnIsolate=yes to systemd-journald too We already had it on the socket units, so it's possible that systemd-journald.service would be stopped and then restarted when trafic hits the sockets when something logs. Let's not try to stop it. It is supposed to run until the end and be eventually killed in the final killing spree. This might (or not) help with #23287. --- units/systemd-journald-dev-log.socket | 6 +++--- units/systemd-journald.service.in | 5 +++++ units/systemd-journald.socket | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/units/systemd-journald-dev-log.socket b/units/systemd-journald-dev-log.socket index 93e8b252b25..e2a9352719d 100644 --- a/units/systemd-journald-dev-log.socket +++ b/units/systemd-journald-dev-log.socket @@ -13,9 +13,9 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5) DefaultDependencies=no Before=sockets.target -# Mount and swap units need this. If this socket unit is removed by an -# isolate request the mount and swap units would be removed too, -# hence let's exclude this from isolate requests. +# Mount and swap units need this. If this socket unit is removed by an isolate +# request the mount and swap units would be removed too, hence let's exclude +# systemd-journald and its sockets from isolate requests. IgnoreOnIsolate=yes [Socket] diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in index cd17b6b4e7e..38ba3e28563 100644 --- a/units/systemd-journald.service.in +++ b/units/systemd-journald.service.in @@ -15,6 +15,11 @@ Requires=systemd-journald.socket After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket Before=sysinit.target +# Mount and swap units need the journal socket units. If they were removed by +# an isolate request the mount and swap units would be removed too, hence let's +# exclude systemd-journald and its sockets from isolate requests. +IgnoreOnIsolate=yes + [Service] DeviceAllow=char-* rw ExecStart={{ROOTLIBEXECDIR}}/systemd-journald diff --git a/units/systemd-journald.socket b/units/systemd-journald.socket index ada3520ad15..1e2178e8fdf 100644 --- a/units/systemd-journald.socket +++ b/units/systemd-journald.socket @@ -13,9 +13,9 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5) DefaultDependencies=no Before=sockets.target -# Mount and swap units need this. If this socket unit is removed by an -# isolate request the mount and swap units would be removed too, -# hence let's exclude this from isolate requests. +# Mount and swap units need this. If this socket unit is removed by an isolate +# request the mount and swap units would be removed too, hence let's exclude +# systemd-journald and its sockets from isolate requests. IgnoreOnIsolate=yes [Socket]