Project

General

Profile

Bug #27912

enabled_repos_upload should not spam the console

Added by Florian Apolloner 9 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Client/Agent
Target version:
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
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.

Associated revisions

Revision c35bed91 (diff)
Added by Florian Apolloner 4 months ago

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)

History

#1 Updated by The Foreman Bot 9 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-host-tools/pull/103 added

#2 Updated by Jonathon Turel 8 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.14.0

#3 Updated by Jonathon Turel 6 months ago

  • Target version changed from Katello 3.14.0 to Katello 3.15.0

#4 Updated by Anonymous 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF