Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: /etc/logrotate.d/syslog causes 'No such file or directory' error
Product: Red Hat Enterprise Linux 7 Reporter: Nils Breunese <nils>
Component: rsyslogAssignee: Tomas Heinrich <theinric>
Status: CLOSED ERRATA QA Contact: Marek Marusic <mmarusic>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bgoncalv, dennisf, Jan.van.Eldik, matthias.schroder, mmarusic, mschuppe, myllynen, pvrabec, shane.voss
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1252909 1252910 (view as bug list) Environment:
Last Closed: 2015-11-19 14:29:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1133060    

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. ***