RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1144465 - /etc/logrotate.d/syslog causes 'No such file or directory' error
Summary: /etc/logrotate.d/syslog causes 'No such file or directory' error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: Marek Marusic
URL:
Whiteboard:
: 1319835 (view as bug list)
Depends On:
Blocks: 1133060
TreeView+ depends on / blocked
 
Reported: 2014-09-19 13:02 UTC by Nils Breunese
Modified: 2021-09-09 11:35 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1252909 1252910 (view as bug list)
Environment:
Last Closed: 2015-11-19 14:29:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2173 0 normal SHIPPED_LIVE rsyslog bug fix update 2015-11-19 11:34:00 UTC

Description Nils Breunese 2014-09-19 13:02:26 UTC
Description of problem:

When rsyslog's logrotate jobs run, an error is displayed.

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

rsyslog-7.4.7-6.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Make sure rsyslog is installed
2. Run /etc/cron.daily/logrotate

Actual results:

----
error: stat of /var/log/spooler failed: No such file or directory
----

Expected results:

No error messages.

Additional info:

Both /etc/logrotate.d/syslog and /etc/rsyslog.conf refer to /var/log/spooler, the rsyslog package does not provide/create this directory. I think it should either exist, or the /etc/logrotate.d/syslog should use 'missingok'.

Comment 2 Bruno Goncalves 2014-10-31 13:45:41 UTC
When hitting this problem /var/log/messages does not get rotated.

Adding "missingok" solves the problem.

Comment 3 Matthias Schroder 2014-11-19 13:32:23 UTC
This issue is quite nasty for VMs from images on which /var/log/spooler had been removed to clean the image.

Comment 5 Jan van Eldik 2014-11-19 16:36:00 UTC
(In reply to Matthias Schroder from comment #3)
> This issue is quite nasty for VMs from images on which /var/log/spooler had
> been removed to clean the image.

In our case, virt-sysprep (from libguestfs-tools-c-1.20.11-11.el6) indeed 
removes /var/log/spooler* by default.

Comment 6 Tomas Heinrich 2015-04-11 21:33:37 UTC
(In reply to Nils Breunese from comment #0)
> Both /etc/logrotate.d/syslog and /etc/rsyslog.conf refer to
> /var/log/spooler, the rsyslog package does not provide/create this
> directory.

> I think it should either exist, or the /etc/logrotate.d/syslog
> should use 'missingok'.

Actually, the rsyslog package creates this file in it's %post script.

(In reply to Jan van Eldik from comment #5)
> (In reply to Matthias Schroder from comment #3)
> > This issue is quite nasty for VMs from images on which /var/log/spooler had
> > been removed to clean the image.
> 
> In our case, virt-sysprep (from libguestfs-tools-c-1.20.11-11.el6) indeed 
> removes /var/log/spooler* by default.

Then this looks like a bug in libguestfs-tools - they should truncate the files instead of removing them, or adjust the logrotate scripts accordingly.

I'll add 'missingok' to the logrorate script nevertheless just to make it more robust.

Comment 7 Matthias Schroder 2015-04-13 09:49:37 UTC
Hi Thomas,

(In reply to Tomas Heinrich from comment #6)

> 
> Then this looks like a bug in libguestfs-tools - they should truncate the
> files instead of removing them, or adjust the logrotate scripts accordingly.

Shall we file a bug against libguestfs-tools then, or can this be handled internally?

I anyhow like the idea the add the missingok to the logrotate script to make it more robust.

Matthias

Comment 8 Tomas Heinrich 2015-04-13 22:48:58 UTC
(In reply to Matthias Schroder from comment #7)
> (In reply to Tomas Heinrich from comment #6)
> > Then this looks like a bug in libguestfs-tools - they should truncate the
> > files instead of removing them, or adjust the logrotate scripts accordingly.
> 
> Shall we file a bug against libguestfs-tools then, or can this be handled
> internally?

I'm not familiar with virt-sysprep and its goals. If you think this behavior is bogus, file another bug for libguestfs.

> I anyhow like the idea the add the missingok to the logrotate script to make
> it more robust.

Yes, I'll do that anyway.

Comment 12 errata-xmlrpc 2015-11-19 14:29:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2173.html

Comment 13 Tomas Heinrich 2016-08-09 12:56:49 UTC
*** Bug 1319835 has been marked as a duplicate of this bug. ***


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