Bug 1917422

Summary: [RFE] Add log rotation to rotate /var/log/foreman-maintain logs in the satellite
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8.0CC: apatel, daniel.neeves, ehelms, jentrena, kgaikwad, pdwyer, sokeeffe
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-09 15:17:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Satyajit Das 2021-01-18 13:25:53 UTC
Description of problem:

No log rotation config is defined to rotate /var/log/foreman-maintain log in the satellite server.


Version-Release number of selected component (if applicable):

Satellite 6.x


How reproducible:

100%


Steps to Reproduce: Actual results:

=> Under /etc/logrotate.d on the satellite server, not config was defined to rotate foreman-maintain logs.


Expected results:

=> Config should be defined to rotate foreman-maintain logs.
Additional info:

Comment 1 Kshitij 2021-03-25 13:33:05 UTC
Hello Team,

From the Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1595375, I am able to understand the below.

---
Foreman maintain does log rotate.

Default file size set to 10000KB in /etc/foreman-maintain/foreman_maintain.yml using log_file_size option.

Once file size reach to this limit, it will rotate the log file i.e creates backup log file for old logs - /var/log/foreman-maintain/foreman-maintain.log.0 and continue logging into /var/log/foreman-maintain/foreman-maintain.log file.
---

I want to confirm whether the files stored in /var/log/foreman-maintain/*.log.* will be removed ever or not. Is there any limit set for the same somewhere?