Bug 723565

Summary: Issue diagnostic if both "size" and a time configuration is given
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: jkaluza, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-25 09:43:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Göran Uddeborg 2011-07-20 15:18:04 UTC
As reported in bug 723547, the parsing of the "size" configuration option is currently broken in logrotate.  If that is fixed, a configuration file that has both a "size" configuration and a time configuration like "weekly", only the latest will take effect.  The first one would be silently ignored.

The documentation properly states that the two configurations are mutually exclusive.  But it seems it would make sense to issue a diagnostic if this is done.  I suggest to add this as an enhancement to logrotate.

Comment 1 Jan Kaluža 2011-07-25 09:43:13 UTC
I'm closing this as duplicate of 723797 (although it's newer bug)

*** This bug has been marked as a duplicate of bug 723797 ***

Comment 2 Göran Uddeborg 2011-07-25 21:09:11 UTC
Does that mean you plan to make the "size" directive and a time limit able to coexist, with the semantics that rotation is done when either is triggered?  If so, it makes sense to merge them, even though they aren't strictly speaking duplicates.

One COULD fix this one by adding a diagnostic, and fix bug 723797 by introducing a new directive, separate from both size and minsize.  Letting the old directives keep their current semantics.

Comment 3 Jan Kaluža 2011-07-26 08:24:08 UTC
(In reply to comment #2)
> Does that mean you plan to make the "size" directive and a time limit able to
> coexist, with the semantics that rotation is done when either is triggered?  If
> so, it makes sense to merge them, even though they aren't strictly speaking
> duplicates.
>
> One COULD fix this one by adding a diagnostic, and fix bug 723797 by
> introducing a new directive, separate from both size and minsize.  Letting the
> old directives keep their current semantics.

Yes, that's what I'm going to do (or at least give it a try), but I will have to find time to do it. What exactly do you mean by diagnostic?

Comment 4 Göran Uddeborg 2011-07-26 08:36:07 UTC
(In reply to comment #3)
> Yes, that's what I'm going to do

Ok, then the duplicate relation makes sense.

> but I will have to find time

I know what you mean! :-/

> What exactly do you mean by diagnostic?

Nothing specific, just SOME kind of error message.  As it is today, logrotate silently ignores that the first directive.  I would prefer if it printed an warning message it does it.

But of course, if it stops ignoring it instead, there is no reason to print any message.