Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
1. Proposed title of this feature request
Candlepin log rotation settings should be user-configurable
2. What are the nature and description of the request?
The default settings for candlepin log rotation are too relaxed for large/busy Satellites. As a user, I would like to be able to change the MAX_HISTORY value and that value should persist after an upgrade.
The settings are defined in the file: /var/lib/tomcat/webapps/candlepin/WEB-INF/classes/logback.xml
This file is a part of the candlepin RPM, and it is not marked as a config file, so any user changes will be overwritten on RPM upgrades
3. Why does your organization need this? (List the business requirements here)
On a large/busy Satellite, 52 days of candlepin logs take up 18Gb+ of disk space. It is exceedingly unlikely to need to access logs going back this far, so the disk space is largely wasted. This causes operational issues with filesystems filling up and impacting other parts of the Satellite server.
4. How would you like to achieve this? (List the functional requirements here)
Option 1: Set the logback.xml file as a noreplace-configfile in the candlepin rpm spec
Option 2: Add an option to the satellite-installer to set the desired values
Option 3: Any other solution that would allow a user to configure the log rotation settings for candlepin logs to persist between upgrades
5. For each functional requirement listed, specify how Red Hat and your organization can test to confirm the requirement is successfully implemented.
Make a user-defined change to the default log rotation configurations
Validate the new setting is effective by monitoring the number of log files retained after a log rotation occurs (if changing MAX_HISTORY)
Validate the new setting persists after an upgrade/reinstall of the candlepin RPM
6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No
7. Do you have any specific timeline dependencies and which release would they like to target (i.e. Sat 6.7, RHEL8.1)?
As soon as it is feasible. This becomes an operational issue for us every few weeks as we manually clean old log files
8. List any affected packages or components.
candlepin-2.6.9-1.el7sat.noarch
9. Would your organization be able to assist in testing this functionality if implemented?"
Yes
Chris,
I will take this back to the customer and ask. As stated, it appears that they would like the option of configuring this via the installer, but they may change their minds if it is logged via journalctl or rsyslog.
Thank you for the response.
--Patrick
Hi Chris,
Here is the response from the customer:
"I'm pretty un-opinionated about the mechanism that handles the log rotation. Just glancing at the history, it looks like it was originally in logrotate then moved to logback. As long as we can get some control over tuning the log retention policy I think it will satisfy our needs."
Looks like the method isn't as important to them as being able to control tuning of the log retention policy.
Thanks!
--Patrick
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team. Thank you.
Verified in Satellite 6.13.0 snap 10 (candlepin-4.2.13-1.el8sat.noarch):
Option 1 (Set the logback.xml file as a noreplace-configfile in the candlepin rpm spec) was implemented as solution.
Steps to verify:
1) Downgraded candlepin to 4.1.19-1.el8sat
2) In /var/lib/tomcat/webapps/candlepin/WEB-INF/classes/logback.xml, changed the MAX_HISTORY value to 1.
3) Upgraded candlepin back to 4.2.13-1.el8sat
4) Checked the MAX_HISTORY value persisted.
5) Verified that after next logrotate no candlepin logs older than MAX_HISTORY remained in /var/log/candlepin/
Note: For more information how to set rotation of the other logs (audit.log and error.log) see https://access.redhat.com/solutions/4741091
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.13 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2023:2097