Red Hat Bugzilla – Bug 1286684
running virt-who in big vmware environments results in to fast growing logfiles - candlepin + foreman
Last modified: 2017-08-22 05:28:11 EDT
Description of problem:
In a big environment the information about each processed machine reported by virt-who leads to large log files.
Version-Release number of selected component (if applicable):
Candlepin and foreman in sat 6.1.X
There is line for each reported VM in candlepin log and the whole report in the foreman log.
Instead of having line by host reporting we can have a grouping line like:
"Processed XX host reported by YY"
Do not print the request into log file. I would suggest to have similar behavior like I suggested above. Just to have a note about received report.
The current behavior should be then available in debug mode instead of info mode.
related bug: 1281715
No changes with 6.1.4. Any ideas to improve this?
One way to reduce the log output of candlepin would be to add the following lines to your /etc/candlepin/candlepin.conf file:
Please note this will stop not only the undesirable log messages but the vast majority of log messages coming from ConsumerResource and HypervisorResource.
Also note that this configuration file might get changed by Katello.
With ConsumerResource=WARN in place, one virt-who commit is only causing these messages:
2015-12-16 10:26:53,967 [req=316948b0-2b97-4f4b-a38b-cf5227f89ea6, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=POST, uri=/candlepin/hypervisors?owner=Vodafone&env=Development/cv-VF-All_Locations-Capsule-RHEL7-Essentials
2015-12-16 10:28:02,794 [req=316948b0-2b97-4f4b-a38b-cf5227f89ea6, org=Vodafone] INFO org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=68835
...but we would actually appreciate to see if the action succeeded.
* Setting the following two values in /etc/candlepin/candlepin.conf makes
candlepin.log be more readable and not growing as much as before:
* After the logging change we miss out on statistics of the update, as we
only see that the request was processed OK.
We think the following would be best:
- the current messages like
"org.candlepin.resource.ConsumerResource - Updating 1 guest IDs."
is what should be belonging to DEBUG level.
Suggestion: change the level these are logged to from INFO to DEBUG.
- We could then set loglevel to INFO instead of WARN.
We would nontheless want to see if things break horribly, so
"updated X hypervisors and Y consumers" messages could be output to INFO.
With these 2 changes, we could run INFO loglevel, and would have the amount down to reasonable level.
This has been fixed upstream in Candlepin 2.0.11-1 which is targetted for Sat 6.3