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 1252910 - /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 WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog
Version: 6.7
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1269194
TreeView+ depends on / blocked
 
Reported: 2015-08-12 13:39 UTC by Marek Marusic
Modified: 2019-09-12 08:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1144465
Environment:
Last Closed: 2016-06-02 19:59:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marek Marusic 2015-08-12 13:39:49 UTC
Also present on RHEL6 in both rsyslog-5.8.10-10 and rsyslog7-7.4.10-3

+++ This bug was initially created as a clone of Bug #1144465 +++

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

--- Additional comment from Bruno Goncalves on 2014-10-31 09:45:41 EDT ---

When hitting this problem /var/log/messages does not get rotated.

Adding "missingok" solves the problem.

--- Additional comment from Matthias Schroder on 2014-11-19 08:32:23 EST ---

This issue is quite nasty for VMs from images on which /var/log/spooler had been removed to clean the image.

--- Additional comment from Jan van Eldik on 2014-11-19 11:36:00 EST ---

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

--- Additional comment from Tomas Heinrich on 2015-04-11 17:33:37 EDT ---

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

--- Additional comment from Matthias Schroder on 2015-04-13 05:49:37 EDT ---

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

--- Additional comment from Tomas Heinrich on 2015-04-13 18:48:58 EDT ---

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


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