----- Original Message -----
> From: [email protected]
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected]
> Sent: Thursday, 14 August, 2014 3:54:22 PM
> Subject: Re: [LTP] [PATCH] syslog-lib: add SystemLogSocketName to rsyslog.conf
>
> Hi!
> > If this parameter is ommitted, rsyslog will use default,
> > which is /dev/log. After rsyslog stop/restart, this node gets
> > deleted. This breaks further syslog() calls on distros
> > using systemd-journald when test performs cleanup, because
> > rsyslog doesn't re-create /dev/log. Default distro rsyslog
> > config is "/run/systemd/journal/syslog", so system ends
> > up with missing /dev/log.
> >
> > For example:
> > cp -f /etc/rsyslog.conf /etc/rsyslog.conf.backup
> > echo '$ModLoad imuxsock.so' > /etc/rsyslog.conf
> > echo "*.crit /var/log/messages" >> /etc/rsyslog.conf
> > systemctl restart rsyslog
> > cp /etc/rsyslog.conf.backup /etc/rsyslog.conf
> > systemctl restart rsyslog # --> PROBLEM: /dev/log is now gone
> >
> > This patch will include "$SystemLogSocketName" line from
> > rsyslog configuration to rsyslog.conf defined by syslog* tests.
>
> 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.
Regards,
Jan
>
> --
> Cyril Hrubis
> [email protected]
>
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list