Bug 2196624 - Certbot logrotate config file has text without comments
Summary: Certbot logrotate config file has text without comments
Keywords:
Status: CLOSED DUPLICATE of bug 2189779
Alias: None
Product: Fedora
Classification: Fedora
Component: certbot
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Bebout
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-09 15:24 UTC by Charles Dennett
Modified: 2023-05-22 18:17 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-05-22 18:17:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Charles Dennett 2023-05-09 15:24:15 UTC
Cerbot version 2.5.0-2 includes the file /etc/logrotate.d/certbot with the following content:
-----------------
# Automated renewal of certificates

The Fedora certbot package includes an optional systemd timer to handle renewals.

This timer is set to run daily, with a random fudge factor of a 6 hours applied.

To enable the timer based renewals:

```
systemctl enable --now certbot-renew.timer
```

The timer makes use of /etc/sysconfig/certbot to customise the behaviour.

Unless there is a plugin that automates restarts (eg the apache plugin) it is
important to configure a command to restart anything that uses the certificates
----------------

Note only the first line is commented, the rest are not.  The uncommented lines cause logrotate to throw errors.  It does not seem to prevent logrotate from rotating all other log files.  As far as I can tell, my installation of cerbot has always had the certbot-renew.timer enabled since I started using certbot in late 2017.

Reproducible: Always

Steps to Reproduce:
1.Install and configure certbot
2.Run logrotate
3.
Actual Results:  
The following lines appear in the journal:

May 09 00:00:17 redwood logrotate[274482]: error: certbot:3 unknown option 'The' -- ignoring line
May 09 00:00:17 redwood logrotate[274482]: error: certbot:5 unknown option 'This' -- ignoring line
May 09 00:00:17 redwood logrotate[274482]: error: certbot:7 unknown option 'To' -- ignoring line
May 09 00:00:17 redwood logrotate[274482]: error: certbot:9 lines must begin with a keyword or a filename (possibly in double quotes)
May 09 00:00:17 redwood logrotate[274482]: error: found error in file certbot, skipping
May 09 00:00:17 redwood systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
May 09 00:00:17 redwood systemd[1]: logrotate.service: Failed with result 'exit-code'.
May 09 00:00:17 redwood systemd[1]: Failed to start logrotate.service - Rotate log files.


Expected Results:  
No errors should appear

Comment 1 Jonathan Wright 2023-05-22 18:17:10 UTC

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


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