Bug 723565 - Issue diagnostic if both "size" and a time configuration is given
Summary: Issue diagnostic if both "size" and a time configuration is given
Keywords:
Status: CLOSED DUPLICATE of bug 723797
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 15
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-20 15:18 UTC by Göran Uddeborg
Modified: 2011-07-26 08:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-25 09:43:13 UTC
Type: ---


Attachments (Terms of Use)

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.


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