Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1224972 - rsyslog logrotate issue
Summary: rsyslog logrotate issue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rsyslog
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Heinrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1231406 1234358 1235173 1237298 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-26 10:26 UTC by Morten Stevens
Modified: 2016-09-20 04:53 UTC (History)
21 users (show)

Fixed In Version: rsyslog-8.8.0-3.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-12 17:16:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Morten Stevens 2015-05-26 10:26:27 UTC
Description of problem:

rsyslog does not use the newly created logfiles (messages, maillog and so on) after the weekly log rotation is done.

Version-Release number of selected component (if applicable):

rsyslog-8.8.0-2.fc22.x86_64

Actual results:

/var/log/messages is empty

Expected results:

rsyslog should use the newly created logfiles after the log rotation is done

Additional info:

Interim solution: restart rsyslog manually every week

Comment 1 Fabrice Bellet 2015-06-08 08:16:09 UTC
it could be caused by the postrotate command in /etc/logrotate.d/syslog, that assumes the rsyslogd PID file is /var/run/syslogd.pid, instead of /var/run/rsyslogd.pid

Comment 2 Morten Stevens 2015-06-08 11:31:02 UTC
(In reply to Fabrice Bellet from comment #1)
> it could be caused by the postrotate command in /etc/logrotate.d/syslog,
> that assumes the rsyslogd PID file is /var/run/syslogd.pid, instead of
> /var/run/rsyslogd.pid

Yes, that sounds very likely.

Comment 3 Jason Haar 2015-06-10 09:18:20 UTC
confirmed - I was about to report this bug when I found this. Just change /var/run/syslog.pid to /var/log/rsyslog.pid to fix the problem

Comment 4 Tomas Heinrich 2015-06-10 12:29:03 UTC
Looks like a screwup on my part. I'll change the settings with the next update.

Comment 5 Tomas Heinrich 2015-06-11 17:06:26 UTC
It's actually a regression upstream: https://github.com/rsyslog/rsyslog/issues/86

Comment 6 Tomas Heinrich 2015-06-16 12:38:55 UTC
*** Bug 1231406 has been marked as a duplicate of this bug. ***

Comment 7 Stefan Becker 2015-06-28 06:54:21 UTC
*** Bug 1234358 has been marked as a duplicate of this bug. ***

Comment 8 Stefan Becker 2015-06-28 06:55:47 UTC
*** Bug 1235173 has been marked as a duplicate of this bug. ***

Comment 9 Stefan Becker 2015-06-28 07:02:02 UTC
Confirmed. Running manually

 # kill -HUP $(cat /var/run/rsyslogd.pid)

on my F22 box causes rsyslog to switch to the new logfiles.

Comment 10 Ralf Ertzinger 2015-06-28 15:30:11 UTC
Not sure what the agreed standard on this is, but given we have systemd now we might as well make use of it:

systemctl kill -s HUP rsyslog

And noone has to know where the PID file is on any given day.

Comment 11 Tomas Heinrich 2015-06-29 09:17:53 UTC
(In reply to Ralf Ertzinger from comment #10)
> Not sure what the agreed standard on this is, but given we have systemd now
> we might as well make use of it:
> 
> systemctl kill -s HUP rsyslog
> 
> And noone has to know where the PID file is on any given day.

Sounds like an improvement. I'll push this change to, and probably only to, current rawhide.

Comment 12 Roderick Johnstone 2015-06-29 09:24:31 UTC
(In reply to Tomas Heinrich from comment #11)
> (In reply to Ralf Ertzinger from comment #10)
> > Not sure what the agreed standard on this is, but given we have systemd now
> > we might as well make use of it:
> > 
> > systemctl kill -s HUP rsyslog
> > 
> > And noone has to know where the PID file is on any given day.
> 
> Sounds like an improvement. I'll push this change to, and probably only to,
> current rawhide.

Are you planning to make any fix to the F22 package?

Comment 13 Tomas Heinrich 2015-06-29 09:47:34 UTC
(In reply to Roderick Johnstone from comment #12)

> Are you planning to make any fix to the F22 package?

Of course. Just not this particular change.
The backlog for this particular rebase got a bit long...

Comment 14 Pete Zaitcev 2015-06-30 18:19:59 UTC
*** Bug 1237298 has been marked as a duplicate of this bug. ***

Comment 15 Fedora Update System 2015-07-02 16:20:54 UTC
rsyslog-8.8.0-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/rsyslog-8.8.0-3.fc22

Comment 16 Fedora Update System 2015-07-03 18:33:44 UTC
Package rsyslog-8.8.0-3.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rsyslog-8.8.0-3.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11039/rsyslog-8.8.0-3.fc22
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2015-07-16 02:33:13 UTC
rsyslog-8.8.0-3.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Terje Røsten 2015-08-30 12:34:04 UTC
Hi Tomas,

this change breaks parallel install of rsyslog and syslog-ng.

rsyslog and syslog-ng both uses /var/run/syslogd.pid as pidfile,
as an side effect they can both install identical versions of
/etc/logrotate.d/syslog and both can be installed at the same time.

When adding rsyslog specific calls into /etc/logrotate.d/syslog you break
this design.

rsyslog as of rsyslog-8.10.0-1.fc23.x86_64 uses pidfile /var/run/syslogd.pid
and the previous line of 

/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

still works.

{ If you refuse to revert this change, at least mark syslog-ng as conflict 
  rsyslog, this way dnf can remove rsyslog when installing syslog-ng. }

Comment 19 Tomas Heinrich 2016-01-12 17:16:34 UTC
(In reply to Terje Røsten from comment #18)
> Hi Tomas,

Hi,

> this change breaks parallel install of rsyslog and syslog-ng.

the change you describe is unrelated to the original issue in this bug and it only affects f23 while this bz is filed for f22. Hence I'm closing this bz again.

I've created bug 1297878 with your description for the new issue. Let's continue the discussion there.


Note You need to log in before you can comment on or make changes to this bug.