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.
Bug 1947095 - satellite-maintain logs with DEBUG level by default
Summary: satellite-maintain logs with DEBUG level by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.8.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: 6.14.0
Assignee: Eric Helms
QA Contact: Griffin Sullivan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-07 16:30 UTC by Julio Entrena Perez
Modified: 2023-11-08 14:17 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:17:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_maintain pull 731 0 None open Default to INFO level logging 2023-05-19 23:03:49 UTC
Red Hat Issue Tracker SAT-18015 0 None None None 2023-06-01 02:34:50 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:17:48 UTC

Description Julio Entrena Perez 2021-04-07 16:30:02 UTC
Description of problem:
Command satellite-maintain logs its activity to file /var/log/foreman-maintain/foreman-maintain.log with DEBUG log level in its default configuration.

Compounded with files at /var/log/foreman-maintain not being rotated as per bug 1917422 , this can add up over time and exhaust the space available at /var/log:

# ls -lrt /var/log/foreman-maintain
total 1728620
-rw-r--r--. 1 root root  32735994 Jul 22  2020 foreman-maintain.log.3.gz
-rw-r--r--. 1 root root  53485973 Jul 22  2020 foreman-maintain.log.2.gz
-rw-rw-r--. 1 root root  10240018 Mar 21 00:48 foreman-maintain.log.8
-rw-------. 1 root root  10240058 Mar 23 09:42 foreman-maintain.log.7
-rw-rw-r--. 1 root root  10240587 Mar 25 17:42 foreman-maintain.log.6
-rw-rw-r--. 1 root root  10241774 Mar 27 23:50 foreman-maintain.log.5
-rw-rw-r--. 1 root root  92984095 Mar 28 09:05 foreman-maintain.log.4
-rw-r--r--. 1 root root 520596683 Mar 28 09:05 foreman-maintain.log.3
-rw-r--r--. 1 root root 978868396 Mar 28 09:08 foreman-maintain.log.2
-rw-r--r--. 1 root root  30777676 Mar 28 09:11 foreman-maintain.log.1
-rw-r--r--. 1 root root  10240035 Mar 31 00:11 foreman-maintain.log.0
-rw-rw-r--. 1 root root   9389622 Apr  1 15:55 foreman-maintain.log

(1.7 GB)

Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.6.13-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run "satellite-maintain service status" repeatedly

Actual results:
Disk usage at /var/log/foreman-maintain grows by 143KB on each invocation.

Expected results:
A lower log level such as ERROR helps preventing disk space at /var/log from being exhausted.

Additional info:
The default contents of configuration file /etc/foreman-maintain/foreman_maintain.yml already specify ERROR log level, but the line is commented out:

# cat /etc/foreman-maintain/foreman_maintain.yml 
# Directory where the logs are stored.
# The default file is named as /log/foreman_maintain.log
:log_dir: '/var/log/foreman-maintain/'

# Logger levels: mention one of debug, info, warning, error, fatal
# :log_level: 'error'

Comment 3 Brad Buckingham 2023-05-08 12:47:51 UTC
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.

Comment 7 Brad Buckingham 2023-06-12 23:19:44 UTC
Moving to POST as the upstream PR has been merged.

Comment 8 Griffin Sullivan 2023-07-05 19:27:33 UTC
Verified on 6.14 snap 6

foreman-maintain logs default to INFO.

Steps to Reproduce:

1) Run `satellite-maintain service status`

2) Check for INFO in the output of /var/log/foreman-maintain/foreman-maintain.log

3) Between runs check the disk usage doesn't increase drastically.

Comment 11 errata-xmlrpc 2023-11-08 14:17:34 UTC
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.14 security and bug fix update), 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:6818


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