Bug 417771 - logrotate missingok option ignored if wildcards are used
logrotate missingok option ignored if wildcards are used
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logrotate (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Smetana
Depends On:
  Show dependency treegraph
Reported: 2007-12-10 03:39 EST by Matteo Corti
Modified: 2010-03-04 09:29 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2008-0703
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 15:52:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matteo Corti 2007-12-10 03:39:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: Gecko/20071127 Firefox/

Description of problem:
If the missingok option is present and the log file to be rotated is missing no error should be issued and logrotate should continue.

It works if the the file to rotate does not contain wildcards:

/var/log/my_non_existing_log_file {

but generates an error if wildcards are used

/var/log/my_dir/*/my_log_file {

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

How reproducible:

Steps to Reproduce:
1. create the /etc/logrotate.d/test file as follows:

/var/log/my_dir/*/my_log_file {

2. run logrotate

$  /etc/cron.daily/logrotate 

Actual Results:
error: error accessing /var/log/my_dir/*/my_log_file: No such file or directory
error: test:1 glob failed for /var/log/my_dir/*/my_log_file

Expected Results:
No errors (since missingok is specified)

Additional info:
Comment 1 Tomas Smetana 2008-01-22 07:13:32 EST
The problem is that actually nobody ever thought of using wildcard in the middle
of the path:  The config you specified means to rotate everything under
/var/log/my_dir, even the files already rotated.  Would you really want to do

This should be probably documented.
Comment 2 Tomas Smetana 2008-01-22 07:36:51 EST
At a second though -- you're right.  This should work.
Comment 3 RHEL Product and Program Management 2008-01-22 07:45:55 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 10 David Mansfield 2008-05-09 15:04:46 EDT
I'm experiencing this for a wildcard where the '*' is not quite 'in the middle
of the path' but rather something like

/my/app/logs/*log {

and it fails with the same glob error as above

this is fairly severe because if /my/app/logs directory gets removed, then all
log rotation on the system stops
Comment 11 David Mansfield 2008-05-09 16:00:44 EDT
fyi: this bug is a dup of some fedora bugs:

bug#166510, bug#182062
Comment 12 errata-xmlrpc 2008-07-24 15:52:19 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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