Bug 1625649 - Yum plugins are loaded multiple times after updating the host to the latest katello-agent packages [NEEDINFO]
Summary: Yum plugins are loaded multiple times after updating the host to the latest k...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: katello-agent
Version: 6.4
Hardware: x86_64
OS: Linux
high
medium with 1 vote vote
Target Milestone: Released
Assignee: Jonathon Turel
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: 1122832 1619394
TreeView+ depends on / blocked
 
Reported: 2018-09-05 12:58 UTC by Mihir Lele
Modified: 2019-10-07 17:17 UTC (History)
38 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1684690 (view as bug list)
Environment:
Last Closed: 2019-05-14 12:37:51 UTC
jturel: needinfo? (akolomitz)


Attachments (Terms of Use)
Obtain mappings outside of loop (1.81 KB, patch)
2018-10-24 16:18 UTC, Nicholas Hall
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:38:03 UTC
Foreman Issue Tracker 25173 None None None 2018-11-15 21:41:34 UTC
Red Hat Knowledge Base (Solution) 3667101 None None None 2018-10-25 18:39:29 UTC

Description Mihir Lele 2018-09-05 12:58:51 UTC
Description of problem:  

Yum plugins are loaded multiple times after updating to the latest katello-agent. It is observed that this number is usually equal to the number of enabled repos.

Version-Release number of selected component (if applicable):  6.4 HTB


How reproducible: Always


Steps to Reproduce:
1. Register a host with Satellite 6.4 HTB
2. Update the katello-agent packages coming from the rhel-7-server-satellite-tools-6-beta-rpms or rhel-6-server-satellite-tools-6-beta-rpms for rhel6.
3. Clear yum cache and run a yum repolist

Actual results:


[root@capsule ~]# yum repolist
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager


repo id                                                                    repo name                                                                                   status
!rhel-7-server-ansible-2.6-rpms/x86_64                                     Red Hat Ansible Engine 2.6 RPMs for Red Hat Enterprise Linux 7 Server                            8
!rhel-7-server-rpms/7Server/x86_64                                         Red Hat Enterprise Linux 7 Server (RPMs)                                                    20,891
!rhel-7-server-satellite-maintenance-6-beta-rpms/x86_64                    Red Hat Satellite Maintenance 6 Beta (for RHEL 7 Server) (RPMs)                                 14
!rhel-7-server-satellite-tools-6-beta-rpms/x86_64                          Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)                                       62
!rhel-server-rhscl-7-rpms/7Server/x86_64                                   Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server                     10,401
repolist: 31,376
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager



Expected results:

[root@capsule ~]# yum repolist
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager


repo id                                                                    repo name                                                                                   status
!rhel-7-server-ansible-2.6-rpms/x86_64                                     Red Hat Ansible Engine 2.6 RPMs for Red Hat Enterprise Linux 7 Server                            8
!rhel-7-server-rpms/7Server/x86_64                                         Red Hat Enterprise Linux 7 Server (RPMs)                                                    20,891
!rhel-7-server-satellite-maintenance-6-beta-rpms/x86_64                    Red Hat Satellite Maintenance 6 Beta (for RHEL 7 Server) (RPMs)                                 14
!rhel-7-server-satellite-tools-6-beta-rpms/x86_64                          Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)                                       62
!rhel-server-rhscl-7-rpms/7Server/x86_64                                   Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server                     10,401
repolist: 31,376
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager


Additional info:

Comment 6 Nicholas Hall 2018-10-24 16:03:46 UTC
Here's a simple way to reproduce the issue:

[root@rhel7test1 ~]# katello-enabled-repos-upload 
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager


Version info:

[root@rhel7test1 ~]# rpm -qa katello-host-tools
katello-host-tools-3.3.5-3.el7sat.noarch


Notes:

I traced the issue through the Katello python packages to the '_obtain_mappings_yum()' method in /usr/lib/python2.7/site-packages/katello/enabled_report.py. From there it jumps to the yum library where I lost track of what's going on.

Comment 7 Nicholas Hall 2018-10-24 16:18:07 UTC
Created attachment 1497111 [details]
Obtain mappings outside of loop

Proposed patch to katello/enabled_report.py that moves the call to _obtain_mappings() outside the loop preventing Yum plugins from loading multiple times and fixing the issue.

Comment 13 Jonathon Turel 2018-11-15 21:41:30 UTC
Connecting redmine issue http://projects.theforeman.org/issues/25173 from this bug

Comment 19 Jonathon Turel 2019-02-06 05:14:45 UTC
Hi Ché, to my knowledge this is a regression in 6.4 so it shouldn't be happening to 6.3 customers. Do you have any cases to the contrary?

Comment 20 Jonathon Turel 2019-02-07 19:30:57 UTC
Brad - can you comment on whether we should release a hotfix or wait for the next 6.4.z ? I can't seem to find a date for it

Comment 22 Matt 2019-02-07 22:57:52 UTC
Will this be fixed in a 6.4.z release?? Or will we really have to wait all the way until 6.5.0 to get this fixed??!

I would very much like a hotfix if we are being forced to wait until 6.5.0 to get this fixed (which is pretty disappointing if so)...

Comment 24 Jonathon Turel 2019-02-08 15:28:56 UTC
Hi Yaniv, which version of katello-host-tools is running on their clients? That's the package we'll need to hotfix

Comment 35 Jonathon Turel 2019-02-13 20:48:46 UTC
One thing I would like to clarify is that the fix here addresses only the slow generation of the enabled repositories report. The performance issue is totally on the client side and there shouldn't be any additional requests being sent to the server. Some of the earlier comments have led me to believe there is a misconception that for each iteration of "Loaded plugins..." that there are extra requests being sent to the server and that should not be the case.

Comment 41 Emil 2019-02-21 06:50:29 UTC
(In reply to Matt from comment #22)
> Will this be fixed in a 6.4.z release?? Or will we really have to wait all
> the way until 6.5.0 to get this fixed??!
> 
> I would very much like a hotfix if we are being forced to wait until 6.5.0
> to get this fixed (which is pretty disappointing if so)...

Asking the good questions Matt! Sadly no response...

Comment 42 Jonathon Turel 2019-02-25 15:16:29 UTC
(In reply to Emil from comment #41)
> (In reply to Matt from comment #22)
> > Will this be fixed in a 6.4.z release?? Or will we really have to wait all
> > the way until 6.5.0 to get this fixed??!
> > 
> > I would very much like a hotfix if we are being forced to wait until 6.5.0
> > to get this fixed (which is pretty disappointing if so)...
> 
> Asking the good questions Matt! Sadly no response...

This is now targeted for 6.4.3

The release date is not definite at this point, so if there is a need for a hotfix please reach out to Red Hat support.

Comment 43 Mike McCune 2019-03-01 22:16:34 UTC
This bug was cloned and is still going to be included in the 6.4.3 release. It no longer has the sat-6.4.z+ flag and 6.4.3 Target Milestone Set which are now on the 6.4.z cloned bug. Please see the Clones field to track the progress of this bug in the 6.4.3 release.

Comment 44 akolomitz 2019-03-28 17:01:42 UTC
(In reply to Jonathon Turel from comment #19)
> Hi Ché, to my knowledge this is a regression in 6.4 so it shouldn't be
> happening to 6.3 customers. Do you have any cases to the contrary?

I am currently seeing this behavior on Satellite 6.3.5 with katello-host-tools-3.1.0-2.el7sat.noarch. Please let me know what information you require, as I am happy to help.

Comment 46 Jonathon Turel 2019-04-01 17:38:07 UTC
(In reply to akolomitz from comment #44)
> (In reply to Jonathon Turel from comment #19)
> > Hi Ché, to my knowledge this is a regression in 6.4 so it shouldn't be
> > happening to 6.3 customers. Do you have any cases to the contrary?
> 
> I am currently seeing this behavior on Satellite 6.3.5 with
> katello-host-tools-3.1.0-2.el7sat.noarch. Please let me know what
> information you require, as I am happy to help.

I'm confident this bug doesn't affect katello-host-tools-3.1.0 because the area of code which introduced the problem doesn't exist in that version.

The bug here reports that yum plugins are loaded once for each repository enabled on the system. Here's my client with tools version 3.1.0 and over 20 enabled repos:

> yum repolist
Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id,
              : search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
 * base: packages.oit.ncsu.edu
 * epel: download-ib01.fedoraproject.org
 * extras: distro.ibiblio.org
 * updates: packages.oit.ncsu.edu
repo id                                                                          status
<SNIP 30+ more repos>
base/7/x86_64                                                                    10,019
cr/7/x86_64                                                                           0
epel/x86_64                                                                      13,030
extras/7/x86_64                                                                     385
updates/7/x86_64                                                                  1,477
repolist: 26,950
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, product-id, subscription-manager

At the end you can see that plugins are loaded only once (twice if you count the initial yum command). On a system exhibiting this bug the output "Loaded plugins: fastestmirror, product-id, subscription-manager" would be repeated for each enabled repository which would have been about 40 times on my test system.

Can you provide some more details - output etc? Perhaps there's a separate issue.

Comment 47 Peter Vreman 2019-04-02 08:45:58 UTC
As the original reporter of the regression seen starting with 6.4.0Beta i confirm it is fixed in 6.5.0Beta

Comment 50 errata-xmlrpc 2019-05-14 12:37:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.