On Thu, Jul 09, 2015 at 09:39:54AM -0400, Jan Stancek wrote:
> Do the testcases pass for you with this patch? They still fail for me with
> rsyslog-7.4.7-7.el7_0 and systemd-219-5.el7.
...
> which fails for me unless I add "$WorkDirectory" option.
Hmm, it worked in my tests last night, but it's failing today. You're
right, the $WorkDirectory option fixed it. Fortunately that's just a
minor tweak to the regex in the patch; see attached for a new version of
the patch.
::::::::::::
:: Before ::
::::::::::::
[root@localhost bin]# grep -i journal syslog-lib.sh
[root@localhost bin]# syslog01 ; echo $?
syslog01 0 TINFO : Send messages to syslogd at some level
syslog01 0 TINFO : and facility and grep for those messages.
syslog01 0 TINFO : testing whether messages are logged into log file
syslog01 0 TINFO : restarting syslog daemon
syslog01 0 TINFO : restarting syslog daemon
1
:::::::::::
:: After ::
:::::::::::
[root@localhost bin]# grep -i journal syslog-lib.sh
systemd_journal=$(grep -Ehoi
"^[^#].*(imjournal|workdirectory).*" -r /etc/rsyslog.conf /etc/rsyslog.d/)
$systemd_journal
[root@localhost bin]# syslog01 ; echo $?
syslog01 0 TINFO : Send messages to syslogd at some level
syslog01 0 TINFO : and facility and grep for those messages.
syslog01 0 TINFO : testing whether messages are logged into log file
syslog01 0 TINFO : restarting syslog daemon
syslog01 0 TINFO : restarting syslog daemon
0
> > I think it's ok to leave both modules enabled, though. The default
> > rsyslog.conf in Fedora (up to F21) had both enabled:
>
> It seems to duplicate messages for me in quite unpredictable way.
> After running syslog02:
With the updated patch, it looks ok for me:
[root@localhost bin]# systemctl stop rsyslog
[root@localhost bin]# cat /dev/null >/var/log/maillog
[root@localhost bin]# systemctl start rsyslog
[root@localhost bin]# syslog02
...
root@localhost bin]# cat /var/log/maillog
2015-07-09T10:32:10.383470-04:00 localhost syslogtst: syslogtst: mail emerg
test.
2015-07-09T10:32:14.403420-04:00 localhost syslogtst: syslogtst: mail alert
test.
2015-07-09T10:32:18.422884-04:00 localhost syslogtst: syslogtst: mail crit test.
2015-07-09T10:32:22.442509-04:00 localhost syslogtst: syslogtst: mail err test.
2015-07-09T10:32:26.461447-04:00 localhost syslogtst: syslogtst: mail warning
test.
2015-07-09T10:32:30.480587-04:00 localhost syslogtst: syslogtst: mail notice
test.
2015-07-09T10:32:34.499815-04:00 localhost syslogtst: syslogtst: mail info test.
2015-07-09T10:32:38.518913-04:00 localhost syslogtst: syslogtst: mail debug
test.
--
Jeff Bastian
commit 4caed564ffbf2f1ac1d889d598e0fa8269562929 (HEAD, rsyslog-imjournal)
Author: Jeffrey Bastian <jbast...@redhat.com>
Date: Wed Jul 8 14:06:48 2015 -0500
syslog/syslog-lib.sh: support systemd journal
rsyslog needs to use the imjournal module to communicate with
systemd-journald. Copy the imjournal lines from the system's
/etc/rsyslog.conf if they exist.
Signed-off-by: Jeffrey Bastian <jbast...@redhat.com>
diff --git a/testcases/kernel/syscalls/syslog/syslog-lib.sh
b/testcases/kernel/syscalls/syslog/syslog-lib.sh
index ef33517aa92b..d2a47112b493 100755
--- a/testcases/kernel/syscalls/syslog/syslog-lib.sh
+++ b/testcases/kernel/syscalls/syslog/syslog-lib.sh
@@ -72,8 +72,10 @@ setup()
elif [ "$SYSLOG_DAEMON" = "rsyslog" ]; then
CONFIG_FILE="/etc/rsyslog.conf"
log_socket=$(grep -ho "^\$SystemLogSocketName .*" -r
/etc/rsyslog.conf /etc/rsyslog.d/ | head -1)
+ systemd_journal=$(grep -Ehoi
"^[^#].*(imjournal|workdirectory).*" -r /etc/rsyslog.conf /etc/rsyslog.d/)
RSYSLOG_CONFIG=$(cat <<EOF
\$ModLoad imuxsock.so
+$systemd_journal
$log_socket
EOF
)
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list