----- Original Message -----
> From: [email protected]
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected]
> Sent: Thursday, 14 August, 2014 4:41:52 PM
> Subject: Re: [LTP] [PATCH] syslog-lib: add SystemLogSocketName to rsyslog.conf
> 
> Hi!
> > > I've read this twice and I'm still unsure what happens.
> > > 
> > > My guess is that on new enough RedHat all logging goes through systemd
> > > and the rsyslog configuration contains explicit option to create
> > > /dev/log for compatibility reasons? But if that is the problem why is
> > > the /dev/log missing after the configuration was restored and rsyslog
> > > restarted?
> > 
> > /dev/log is created by systemd-journald. Distro rsyslog config is setup
> > to use /run/systemd/journal/syslog. When rsyslog is stopped/restarted
> > it deletes whatever socket was configured.
> > 
> > This testcase doesn't configure any log socket explicitly in rsyslog
> > config. So rsyslog will use default, which is "/dev/log". Now
> > when you stop/restart rsyslog it deletes /dev/log and all applications
> > which use syslog(2) now fail to log anything.
> > 
> > I think the way it works is that journald reads message from /dev/log
> > and for compatibility reasons it forwards it to /run/systemd/journal/syslog
> > where rsyslog can read and process it.
> 
> Ah, now it's clear to me. And the reason why this works in SUSE without
> any configuration is likely autodetection patch for rsyslog added as a
> result of this bug:
> 
> https://bugzilla.novell.com/show_bug.cgi?id=747871

RHEL7 has that patch, but it looks to apply only when socket is created
for rsyslog. I could track it down to:

# cat /lib/systemd/system/rsyslog.service | head -3
[Unit]
Description=System Logging Service
;Requires=syslog.socket

I think the difference is that RHEL7 doesn't use socket activation
for rsyslog, though I could not find why it was disabled.

In this case commit 3b55048094d759adf8162f0829f239e115ebf2c0 should apply:
  imuxsock: add ability to NOT create/delete sockets during startup and shutdown

+<li><b>SysSock.Unlink</b> &lt;<b>on</b>/off&gt; (available since 7.3.9)<br>
+if turned on (default), the system socket is unlinked and re-created when
+opened and also unlinked when finally closed. Note that this setting has
+no effect when running under systemd control (because systemd handles
+the socket).

> 
> Anyway the patch only tries to preserve the configuration so this should
> not break anything, acked, but please consider rewriting the commit
> message a bit so it's a bit clearer what exactly happens, i.e. describe
> a bit better that rsyslog deletes the node and it's not recreated after
> the config is restored and rsyslog started again because the system
> configuration overrides the default value.

Will do.

Regards,
Jan

> 
> --
> Cyril Hrubis
> [email protected]
> 

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to