Project

General

Custom queries

Profile

Actions

Bug #27912

closed

enabled_repos_upload should not spam the console

Added by Florian Apolloner over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Client/Agent
Target version:
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

enabled_repos_upload currently contains an extra output ala:
Loaded plugins: fastestmirror, product-id, subscription-manager

which can break nagios checks and other software which parses this output. I have attached a PR on Github, let me know if you have any questions about the patch.

Added by Florian Apolloner about 5 years ago

Revision c35bed91 (diff)

fixes #27912 - Disable debug output from yum

By setting the debuglevel to 0 we disable the `Loaded plugins: fastestmirror, product-id, subscription-manager` that `YumBase` would emit otherwise.

After applying this change the output would be:
```
Loaded plugins: enabled_repos_upload, fastestmirror, product-id, search-disabled-repos, subscription-manager

java-1.8.0-openjdk.x86_64 1:1.8.0.222.b10-1.el7_7 updates
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b10-1.el7_7 updates
Uploading Enabled Repositories Report
[root@foreman pluginconf.d]# vi^C
[root@foreman pluginconf.d]# vi /usr/lib/python2.7/site-packages/katello/enabled_report.py
[root@foreman pluginconf.d]# /usr/bin/yum -C check-update
Loaded plugins: enabled_repos_upload, fastestmirror, product-id, search-disabled-repos, subscription-manager

java-1.8.0-openjdk.x86_64 1:1.8.0.222.b10-1.el7_7 updates
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b10-1.el7_7 updates
Uploading Enabled Repositories Report
```
without it another extra line at the bottom would be:
```
Loaded plugins: fastestmirror, product-id, subscription-manager
```
Disabling this output is helpful because it breaks nagios yum checks which don't expect this message at this point. Also for the nagios checks to work one needs to remove `Uploading Enabled Repositories Report` by setting `supress_debug=True` in the plugin config)

Actions

Also available in: Atom PDF