Bug 1745330 - Logrotate fails to start on F30 (possibly others)
Summary: Logrotate fails to start on F30 (possibly others)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2061561
TreeView+ depends on / blocked
 
Reported: 2019-08-25 12:30 UTC by Steve Grubb
Modified: 2022-03-08 15:57 UTC (History)
3 users (show)

Fixed In Version: logrotate-3.15.1-1.fc32 logrotate-3.15.1-1.fc30 logrotate-3.15.1-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-08 02:58:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Grubb 2019-08-25 12:30:09 UTC
Description of problem:
# systemctl status logrotate.service
● logrotate.service - Rotate log files
   Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2019-08-25 08:16:53 EDT; 6min ago


Aug 25 08:16:45 x2 systemd[1]: Starting Rotate log files...
Aug 25 08:16:46 x2 logrotate[1085]: error: /etc/logrotate.conf:21 duplicate log entry for /var/log/wtmp
Aug 25 08:16:46 x2 logrotate[1085]: error: /etc/logrotate.conf:28 duplicate log entry for /var/log/btmp
Aug 25 08:16:53 x2 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Aug 25 08:16:53 x2 systemd[1]: logrotate.service: Failed with result 'exit-code'.
Aug 25 08:16:53 x2 systemd[1]: Failed to start Rotate log files.



Version-Release number of selected component (if applicable):
logrotate-3.15.0-2.fc30.x86_64

Additional info:
Looks like there are 2 problems:
1) /etc/logrotate.conf has entries for both wtmp and btmp. They should be deleted in that file because they are also provided in /etc/logrotate.d/ as standalone files.

2) /etc/logrotate.d/btmp should set the permissions to 0660 rather than 0600 because otherwise utmp cannot access the file.

Comment 1 Kamil Dudka 2019-08-26 13:11:22 UTC
(In reply to Steve Grubb from comment #0)
> 1) /etc/logrotate.conf has entries for both wtmp and btmp. They should be
> deleted in that file because they are also provided in /etc/logrotate.d/ as
> standalone files.

The entries are not in the /etc/logrotate.conf installed by the logrotate package any more.  The problem is that /etc/logrotate.conf is tagged as %config(noreplace) in spec file, so it is not replaced by the new version if there are any local changes to that file.  I am afraid that we are not able to merge the configuration file automatically in all cases.

> 2) /etc/logrotate.d/btmp should set the permissions to 0660 rather than 0600
> because otherwise utmp cannot access the file.

Strange.  The create mode for btmp has not been changed since 2007 and nobody has complained about it yet:

https://github.com/logrotate/logrotate/commit/c2f194b3#diff-922cea84131d2fc3963d3336b17c7fd6R24

I will open a pull request upstream to fix this...

Comment 2 Kamil Dudka 2019-08-26 13:16:49 UTC
(In reply to Kamil Dudka from comment #1)
> I will open a pull request upstream to fix this...

https://github.com/logrotate/logrotate/pull/257

Comment 3 Kamil Dudka 2019-08-29 16:20:54 UTC
(In reply to Kamil Dudka from comment #2)
> https://github.com/logrotate/logrotate/pull/257

pushed as https://github.com/logrotate/logrotate/commit/b1bddec3

Comment 4 Fedora Update System 2019-08-30 14:13:24 UTC
FEDORA-2019-88f966235d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-88f966235d

Comment 5 Fedora Update System 2019-08-30 20:33:05 UTC
logrotate-3.15.1-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ffca24380e

Comment 6 Fedora Update System 2019-08-31 01:03:57 UTC
logrotate-3.15.1-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-88f966235d

Comment 7 Fedora Update System 2019-09-08 02:58:50 UTC
logrotate-3.15.1-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2019-09-14 00:07:51 UTC
logrotate-3.15.1-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2019-09-14 16:31:51 UTC
logrotate-3.15.1-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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