From: Jan Stancek <jstancek@redhat.com>
To: Jeffrey Bastian <jbastian@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v3] syslog/syslog-lib.sh: support systemd journal
Date: Mon, 13 Jul 2015 07:43:16 -0400 (EDT) [thread overview]
Message-ID: <1163491881.16317584.1436787796746.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150709221612.GV17625@tarantula.localdomain>
----- Original Message -----
> From: "Jeffrey Bastian" <jbastian@redhat.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Friday, 10 July, 2015 12:16:12 AM
> Subject: Re: [LTP] [PATCH v3] syslog/syslog-lib.sh: support systemd journal
>
> rsyslog needs to use the imjournal module to communicate with
> systemd-journald instead of imuxsock. Check the system's
> /etc/rsyslog.conf to see if LTP should use imjournal or imuxsock
>
> Signed-off-by: Jeffrey Bastian <jbastian@redhat.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
Looks good to me. I tried this patch with systemd-208 and systemd-219 with
default journald config, the results were as expected with no duplicate messages.
I also tried reversing imuxsock/imjournal to be the opposite of the default
rsyslog config, which worked too. As noted before, ForwardToSyslog=yes
was required for systemd-219 when using imuxsock as that is no longer turned
on by default. This should be of no concern, since we always try to construct
rsyslog config which mimics distro default.
Regards,
Jan
> ---
> testcases/kernel/syscalls/syslog/syslog-lib.sh | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/syslog/syslog-lib.sh
> b/testcases/kernel/syscalls/syslog/syslog-lib.sh
> index ef33517aa92b..e166d3a45261 100755
> --- a/testcases/kernel/syscalls/syslog/syslog-lib.sh
> +++ b/testcases/kernel/syscalls/syslog/syslog-lib.sh
> @@ -71,12 +71,20 @@ setup()
> CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
> elif [ "$SYSLOG_DAEMON" = "rsyslog" ]; then
> CONFIG_FILE="/etc/rsyslog.conf"
> - log_socket=$(grep -ho "^\$SystemLogSocketName .*" -r /etc/rsyslog.conf
> /etc/rsyslog.d/ | head -1)
> - RSYSLOG_CONFIG=$(cat <<EOF
> + if grep -q -r '^\$ModLoad[[:space:]]*imjournal' /etc/rsyslog.conf
> /etc/rsyslog.d/ ; then
> + systemd_journal=$(grep -Ehoi "^[^#].*(imjournal|workdirectory).*" -r
> /etc/rsyslog.conf /etc/rsyslog.d/)
> + RSYSLOG_CONFIG=$(cat <<EOF
> +$systemd_journal
> +EOF
> +)
> + else
> + log_socket=$(grep -ho "^\$SystemLogSocketName .*" -r /etc/rsyslog.conf
> /etc/rsyslog.d/ | head -1)
> + RSYSLOG_CONFIG=$(cat <<EOF
> \$ModLoad imuxsock.so
> $log_socket
> EOF
> )
> + fi
> else
> tst_resm TBROK "Couldn't find syslogd, syslog-ng or rsyslogd"
> cleanup 1
> --
> 1.9.4
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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
next prev parent reply other threads:[~2015-07-13 11:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 19:41 [LTP] [PATCH] syslog/syslog-lib.sh: support systemd journal Jeffrey Bastian
2015-07-09 6:59 ` Jan Stancek
2015-07-09 8:19 ` Jan Stancek
2015-07-09 12:45 ` Jeffrey Bastian
2015-07-09 13:39 ` Jan Stancek
2015-07-09 14:37 ` Jeffrey Bastian
2015-07-09 14:46 ` Jan Stancek
2015-07-09 16:33 ` Jeffrey Bastian
2015-07-09 16:49 ` Jan Stancek
2015-07-09 22:16 ` [LTP] [PATCH v3] " Jeffrey Bastian
2015-07-13 11:43 ` Jan Stancek [this message]
2015-07-16 7:01 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1163491881.16317584.1436787796746.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=jbastian@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox