Bug 498288 - /etc/logrotate.d/syslog from syslog-ng clobbers RHEL5 sysklogd
Summary: /etc/logrotate.d/syslog from syslog-ng clobbers RHEL5 sysklogd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: syslog-ng
Version: el5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Douglas E. Warner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-29 18:14 UTC by Steve Huff
Modified: 2009-04-30 17:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-30 17:52:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
modify %{logrotate_dst}, Conflicts: sysklogd (917 bytes, patch)
2009-04-29 18:14 UTC, Steve Huff
no flags Details | Diff

Description Steve Huff 2009-04-29 18:14:16 UTC
Created attachment 341811 [details]
modify %{logrotate_dst}, Conflicts: sysklogd

Description of problem:

EPEL's syslog-ng package owns /etc/logrotate.d/syslog; unfortunately, so do
the sysklogd packages in RHEL4 and RHEL5.  In addition, since in all these
packages that file is tagged %config, this conflict does not prevent the
simultaneous installation of both packages, which leads to error messages and
potential lost data when logrotate runs.


Version-Release number of selected component (if applicable):
syslog-ng-2.1.4-1.el4
syslog-ng-2.1.4-1.el5
sysklogd-1.4.1-27.el4 (RHEL)
sysklogd-1.4.1-44.el5 (RHEL)


How reproducible:

Install syslog-ng on a stock RHEL4 or RHEL5 system, then run logrotate.

Steps to Reproduce:
1. Build a stock RHEL4 or RHEL5 system (x86 or x86_64)
2. rpm -U epel-release
3. yum install syslog-ng
4. Wait for /etc/cron.daily/logrotate to run
  
Actual results:

/etc/cron.daily/logrotate:

Reloading syslog-ng: [  OK  ]^MReloading syslog-ng: [  OK  ]^MReloading syslog-ng: [  OK  ]

Expected results:

Successful log rotation, no errors.

Additional info:

Attached is a patch which makes two changes:

1. syslog-ng's logrotate configuration is now stored in
/etc/logrotate.d/syslog-ng.
2. syslog-ng now Conflicts with sysklogd; the ability to have both packages
simultaneously installed does more harm than good.

Comment 1 Ray Van Dolson 2009-04-29 18:31:35 UTC
This should probably also conflict with rsyslog (I note that both rsyslog and sysklogd list syslog-ng as conflicts in their .spec files).

Comment 2 Douglas E. Warner 2009-04-29 18:46:03 UTC
syslog-ng, rsyslog, and sysklogd should be parallel installable. There are situations where this is reasonable and syslog-ng is packaged in such a way (as are rsyslog and sysklogd) so they share the same pid file and logrotate script so they can do this (see bug#400661).

Can you give me some more information about what is failing for you?  Do you have both sysklogd and syslog-ng enabled running at the same time?  Nothing from logrotate.d should be running the 'restart' command; it should be doing a "kill -HUP" on the pid file to cause a reload.  Can you verify you have stock logrotate scripts installed (rpm -qVf /etc/logrotate.d/syslog, and check for others)?

Comment 3 Douglas E. Warner 2009-04-29 18:49:05 UTC
(In reply to comment #1)
> This should probably also conflict with rsyslog (I note that both rsyslog and
> sysklogd list syslog-ng as conflicts in their .spec files).  

Neither package should list syslog-ng in their spec files; I can't see this as the case on my CentOS 5 or Fedora boxes.  This should have been resolved awhile ago.

Comment 4 Ray Van Dolson 2009-04-29 18:58:28 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > This should probably also conflict with rsyslog (I note that both rsyslog and
> > sysklogd list syslog-ng as conflicts in their .spec files).  
> 
> Neither package should list syslog-ng in their spec files; I can't see this as
> the case on my CentOS 5 or Fedora boxes.  This should have been resolved awhile
> ago.  

I guess only sysklogd has the conflicts listed[1].

[1] http://cvs.fedoraproject.org/viewvc/rpms/sysklogd/F-11/sysklogd.spec?revision=1.68&view=markup

Comment 5 Douglas E. Warner 2009-04-29 19:05:38 UTC
(In reply to comment #4)
> I guess only sysklogd has the conflicts listed[1].
> 
> [1]
> http://cvs.fedoraproject.org/viewvc/rpms/sysklogd/F-11/sysklogd.spec?revision=1.68&view=markup  

That's only Fedora (not RHEL/EPEL), and thanks for bringing that up so I can file a bug.

Comment 6 Steve Huff 2009-04-30 17:24:25 UTC
(In reply to comment #2)
> 
> Can you give me some more information about what is failing for you?  Do you
> have both sysklogd and syslog-ng enabled running at the same time?  Nothing
> from logrotate.d should be running the 'restart' command; it should be doing a
> "kill -HUP" on the pid file to cause a reload.  Can you verify you have stock
> logrotate scripts installed (rpm -qVf /etc/logrotate.d/syslog, and check for
> others)?  

Thanks, that pointed me to the real problem; there was indeed a leftover
/etc/logrotate.d/syslog-ng.rpmsave from a non-EPEL package, and it
called `service syslog-ng restart`, which produced the problematic
output.  Looks like this is a non-issue; I'm sorry I didn't catch that
the first time around.

Feel free to close this issue.

-Steve

Comment 7 Douglas E. Warner 2009-04-30 17:52:27 UTC
Glad you found it; it's very possible it was one of my old syslog-ng packages before I started migrating things to be compatible w/ the other syslog servers.


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