From c34208ad402b45f52b5d3ee8d2a08df0779ec9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 14 Aug 2018 01:18:47 +0200 Subject: [PATCH] systemd: prevent redundancy in journal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originating from a dual sink (stderr and syslog). Annotated example from "journalctl -b --no-hostname -u corosync": Aug 14 00:27:45 corosync[5203]: [MAIN ] Corosync Cluster Engine ('2.99.3'): started and ready to provide service. ^ from syslog source Aug 14 00:27:45 corosync[5203]: notice [MAIN ] Corosync Cluster Engine ('2.99.3'): started and ready to provide service. ^ from stderr source Signed-off-by: Jan Pokorný Reviewed-by: Jan Friesse --- init/corosync.service.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init/corosync.service.in b/init/corosync.service.in index 8c57652d4..654e41fc2 100644 --- a/init/corosync.service.in +++ b/init/corosync.service.in @@ -10,6 +10,13 @@ EnvironmentFile=-@INITCONFIGDIR@/corosync ExecStart=@SBINDIR@/corosync -f $COROSYNC_OPTIONS Type=notify +# In typical systemd deployments, both standard outputs are forwarded to +# journal (stderr is what's relevant in the pristine corosync configuration), +# which hazards a message redundancy since the syslog stream usually ends there +# as well; before editing this line, you may want to check DefaultStandardError +# in systemd-system.conf(5) and whether /dev/log is a systemd related symlink. +StandardError=null + # The following config is for corosync with enabled watchdog service. # # When corosync watchdog service is being enabled and using with