]> git.proxmox.com Git - mirror_corosync.git/commitdiff
systemd: prevent redundancy in journal
authorJan Pokorný <jpokorny@redhat.com>
Mon, 13 Aug 2018 23:18:47 +0000 (01:18 +0200)
committerJan Friesse <jfriesse@redhat.com>
Tue, 14 Aug 2018 11:03:32 +0000 (13:03 +0200)
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ý <jpokorny@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
init/corosync.service.in

index 8c57652d4479a4a23f728314d1d4b6e45d97681d..654e41fc2c7bdfeaa825f187a7072af589e10c25 100644 (file)
@@ -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