Bug 2029548

Summary: Excluding system facts logs as WARN causing log files to increase dramatically
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Ladislav Vasina <lvasina>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.7CC: ahumbe, lvrtelov, redakkan
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: candlepin-4.1.9-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2029916 (view as bug list) Environment:
Last Closed: 2022-07-05 14:30:51 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:
Bug Depends On:    
Bug Blocks: 2029916    

Description Taft Sanders 2021-12-06 18:11:48 UTC
Description of problem:
When adding the option 'candlepin.consumer.facts.match_regex' /etc/candlepin/candlepin.conf we see all facts that are being excluded logged as WARN. Since this option is not included in the candlepin.conf file by default and it is manually being placed here, I do not believe the exclusions should be or a WARN type. Since this option is also used to exclude systems facts on hosts where the number of these facts are causing long queries or a lot of system resource usage, I believe these should be logged as DEBUG level in the logs to limit the unnecessary logging of INFO+.

Version-Release number of selected component (if applicable):
candlepin-3.1.28-1.el7sat.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Add regex exclusion to the candlepin.conf file for host facts and watch the logs for the matches to appear as WARN level.
2.
3.

Actual results:
Candlepin log files increase in size 3-4x 

Expected results:
This logging should be set on the level of DEBUG as this is an optional parameter to add for systems with a lot of facts.

Additional info:

Comment 1 Ladislav Vasina 2022-06-14 10:44:19 UTC
If debug option is enabled correct message with level:DEBUG will appear:
ie.:
DEBUG org.candlepin.resource.ConsumerResource - Consumer fact "system.certificate_version" does not match pattern "XXX"

VERIFIED with candlepin-4.1.13-1.el8sat.noarch

Comment 4 errata-xmlrpc 2022-07-05 14:30:51 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 (Moderate: Satellite 6.11 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-2022:5498