public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Jeffrey Bastian <jbastian@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] syslog/syslog-lib.sh: support systemd journal
Date: Thu, 9 Jul 2015 10:46:42 -0400 (EDT)	[thread overview]
Message-ID: <1448931194.15074761.1436453202001.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150709143700.GQ17625@tarantula.localdomain>





----- Original Message -----
> From: "Jeffrey Bastian" <jbastian@redhat.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Thursday, 9 July, 2015 4:37:00 PM
> Subject: Re: [LTP] [PATCH] syslog/syslog-lib.sh: support systemd journal
> 
> 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.

Presumably because you are running new systemd. Can you try with
"ForwardToSyslog=yes" set in journald.conf (which is the case for old systemd)?

That still gives me duplicated messages with v2 of the patch.

Regards,
Jan

> 
> --
> Jeff Bastian
> 
> ------------------------------------------------------------------------------
> 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

  reply	other threads:[~2015-07-09 14:46 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 [this message]
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
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=1448931194.15074761.1436453202001.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