Project

General

Profile

Bug #25173

enabled_repos_upload plugin is slow

Added by Kevin Bowers 11 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Client/Agent
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

In its current state, the enabled_repos_upload yum/dnf plugin imports the yum or dnf Python module and creates an associated object each time _replace_vars() is executed. This can lead to time consuming yum operations if there are a large number of enabled yum repositories.

Example
A server has 13 enabled yum repositories. With yum.YumBase() being executed each time _replace_vars() is called, this is the output from a simple yum check-update:

# time yum check-update
Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id, search-disabled-repos, subscription-manager, tracer_upload
Loading mirror speeds from cached hostfile
Centos_Centos_7_Base
Centos_Centos_7_Extras
Centos_Centos_7_Updates
Centos_Centos_sclo
Centos_Centos_sclo-rh
Datadog_Datadog
EPEL_EPEL_Centos7
Extra_rpm-extra
Katello-agent_agent-3_7
MySQL_Enterprise_MySQL_Enterprise
Puppet_puppet_4
Zabbix_Zabbix_3_2
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager
Loaded plugins: fastestmirror, product-id, subscription-manager

real    0m35.492s
user    0m8.330s
sys    0m0.611s

The plugin's output is too long and it takes 35 seconds to report that nothing is available to update.

Associated revisions

Revision 60c286a1 (diff)
Added by Kevin Bowers 10 months ago

fixes #25173 - Fix slow enabled report generation

History

#1 Updated by Kevin Bowers 11 months ago

  • Pull request https://github.com/Katello/katello-host-tools/pull/78 added

#2 Updated by Kevin Bowers 10 months ago

  • Pull request https://github.com/Katello/katello-host-tools/pull/80 added
  • Pull request deleted (https://github.com/Katello/katello-host-tools/pull/78)

#3 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing

#4 Updated by Jonathon Turel 10 months ago

  • Target version set to Katello 3.10.0
  • Found in Releases deleted (Katello 3.10.0)

#5 Updated by Jonathon Turel 10 months ago

  • Status changed from Ready For Testing to Closed
  • Category set to Client/Agent
  • Subject changed from Host Tools - enabled_repos_upload plugin is slow to enabled_repos_upload plugin is slow

#6 Updated by Jonathon Turel 10 months ago

  • Assignee set to Kevin Bowers

#7 Updated by Michael Johnson 10 months ago

  • Triaged changed from No to Yes

#8 Updated by Jonathon Turel 9 months ago

  • Bugzilla link set to 1625649

Also available in: Atom PDF