Actions
Bug #25173
closedenabled_repos_upload plugin is slow
Difficulty:
Triaged:
Yes
Bugzilla link:
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.
Actions