Bug 1797791

Summary: Yum plugins are loaded multiple times after updating the host to the latest subscription-manager
Product: Red Hat Enterprise Linux 7 Reporter: Chris Snyder <csnyder>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: low    
Version: 7.9CC: mvanderw, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-12 14:19:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Snyder 2020-02-03 21:19:02 UTC
This bug was initially created as a copy of Bug #1741183

I am copying this bug because: 

The message "plugins loaded: ..." is still printed three times when katello-agent and subscription-manager are installed together.
As this is still an issue, but was substantially improved by the fix for 1741183, I have cloned this bug to get the count down to 1.

Please note, from a behavioural standpoint, this does not appear to be purely cosmetic. The yum commands take longer to complete the more times the plugins are loaded. I do not have further detail, that will be gathered as an aspect of this fix. Also note that we may end up moving this to katello-agent / katello-host-tools as this seems only to be an issue when both are installed.

Description of problem:

Regression of Bug 1625649


ENV:-

~~~
Red Hat Satellite 6.5.2
RHEL 7.7
~~~

~~~
# rpm -qa | grep katello*
katello-host-tools-fact-plugin-3.5.0-2.el7sat.noarch
katello-ca-consumer-mysat.lab.redhat.com-1.0-1.noarch
katello-agent-3.5.0-2.el7sat.noarch
katello-host-tools-3.5.0-2.el7sat.noarch
~~~

~~~
# rpm -qa | grep subscription-manager
subscription-manager-rhsm-1.24.13-1.el7.x86_64
subscription-manager-plugin-container-1.24.13-1.el7.x86_64
subscription-manager-1.24.13-1.el7.x86_64
subscription-manager-rhsm-certificates-1.24.13-1.el7.x86_64
~~~


ISSUE
-----

# yum update rsyslog
Loaded plugins: changelog, enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos,
              : subscription-manager
                                          | 2.1 kB  00:00:00     
rhel-7-server-extras-rpms                                                              | 2.0 kB  00:00:00     
rhel-7-server-optional-rpms                                                            | 2.0 kB  00:00:00     
rhel-7-server-rh-common-rpms                                                           | 2.1 kB  00:00:00     
rhel-7-server-rpms                                                                     | 2.0 kB  00:00:00     
rhel-7-server-satellite-tools-6.5-rpms                                                 | 2.1 kB  00:00:00     
rhel-7-server-supplementary-rpms                                                       | 2.0 kB  00:00:00     
rhel-7-server-thirdparty-oracle-java-rpms                                              | 1.9 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package rsyslog.x86_64 0:8.24.0-34.el7 will be updated
---> Package rsyslog.x86_64 0:8.24.0-41.el7_7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package              Arch                Version                       Repository                       Size
==============================================================================================================
Updating:
 rsyslog              x86_64              8.24.0-41.el7_7               rhel-7-server-rpms              617 k

Transaction Summary
==============================================================================================================
Upgrade  1 Package

Total download size: 617 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-rpms
rsyslog-8.24.0-41.el7_7.x86_64.rpm                                                     | 617 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : rsyslog-8.24.0-41.el7_7.x86_64                                                             1/2 
  Cleanup    : rsyslog-8.24.0-34.el7.x86_64                                                               2/2 
Uploading Package Profile
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
  Verifying  : rsyslog-8.24.0-41.el7_7.x86_64                                                             1/2 
  Verifying  : rsyslog-8.24.0-34.el7.x86_64                                                               2/2 

Updated:
  rsyslog.x86_64 0:8.24.0-41.el7_7                                                                            

Complete!
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
~~~

This happens when yum performances any transactions (such as update, downgrade etc) not with every yum transaction (such as yum repolist etc).



~~~
[1]. The "Loaded Plugins" output is repeated multiple times after a yum transaction
---> https://access.redhat.com/solutions/3667101
~~~
   
~~~  
[2]. Bug 1684690 - Yum plugins are loaded multiple times after updating the host to the latest katello-agent packages
---> https://bugzilla.redhat.com/show_bug.cgi?id=1684690
~~~

Comment 4 Rehana 2021-07-12 14:19:21 UTC
Bugzilla Backlog meeting :
========================
Based on the backlog meeting , trying to reproduce the issue on RHEL 8 branch .
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.28.17-1.el8

# cat /etc/rhsm/rhsm.conf | grep package_profile_on*
package_profile_on_trans = 0

# subscription-manager repos --enable=*satellite-tools-\*-rpms
Repository 'satellite-tools-6.6-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.8-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6-beta-for-rhel-8-x86_64-source-rpms' is enabled for this system.
Repository 'satellite-tools-6.6-for-rhel-8-x86_64-source-rpms' is enabled for this system.
Repository 'satellite-tools-6.7-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.9-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6.7-for-rhel-8-x86_64-source-rpms' is enabled for this system.
Repository 'satellite-tools-6.8-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.6-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6-beta-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6-beta-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.5-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6.9-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.5-for-rhel-8-x86_64-source-rpms' is enabled for this system.
Repository 'satellite-tools-6.7-for-rhel-8-x86_64-debug-rpms' is enabled for this system.
Repository 'satellite-tools-6.8-for-rhel-8-x86_64-source-rpms' is enabled for this system.
Repository 'satellite-tools-6.5-for-rhel-8-x86_64-rpms' is enabled for this system.
Repository 'satellite-tools-6.9-for-rhel-8-x86_64-source-rpms' is enabled for this system.

# yum install katello-agent
<skip>

# rpm -qa | grep katello*
katello-host-tools-3.5.4-1.el8sat.noarch
katello-agent-3.5.4-1.el8sat.noarch

INSTALL A PACKAGE TO CHECK THE PLUGIN LOADED MESSAGE 

# yum install zsh
Updating Subscription Management repositories.
Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (Debug RPMs)                                    5.9 kB/s | 8.3 kB     00:01    
Red Hat Satellite Tools 6.9 for RHEL 8 x86_64 (Source RPMs)                                   5.1 kB/s | 4.9 kB     00:00    
Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs)                                          252 kB/s | 275 kB     00:01    
Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (Source RPMs)                                   5.9 kB/s | 5.5 kB     00:00    
Red Hat Satellite Tools 6.9 for RHEL 8 x86_64 (Debug RPMs)                                    5.1 kB/s | 6.5 kB     00:01    
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                      7.6 MB/s |  34 MB     00:04    
Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (RPMs)                                          132 kB/s | 145 kB     00:01    
Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (RPMs)                                          123 kB/s | 111 kB     00:00    
Red Hat Satellite Tools 6 Beta for RHEL 8 x86_64 (Debug RPMs)                                 533  B/s | 512  B     00:00    
Red Hat Satellite Tools 6.5 for RHEL 8 x86_64 (RPMs)                                          145 kB/s | 148 kB     00:01    
Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (Debug RPMs)                                    7.5 kB/s | 6.3 kB     00:00    
Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (Debug RPMs)                                    9.8 kB/s |  10 kB     00:01    
Red Hat Satellite Tools 6.5 for RHEL 8 x86_64 (Source RPMs)                                   6.2 kB/s | 5.6 kB     00:00    
Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (Source RPMs)                                   5.7 kB/s | 5.2 kB     00:00    
Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (Source RPMs)                                   4.6 kB/s | 4.5 kB     00:00    
Red Hat Satellite Tools 6.9 for RHEL 8 x86_64 (RPMs)                                          109 kB/s | 114 kB     00:01    
Red Hat Satellite Tools 6.5 for RHEL 8 x86_64 (Debug RPMs)                                     15 kB/s |  13 kB     00:00    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                         9.9 MB/s |  36 MB     00:03    
Red Hat Satellite Tools 6 Beta for RHEL 8 x86_64 (RPMs)                                       540  B/s | 512  B     00:00    
Red Hat Satellite Tools 6 Beta for RHEL 8 x86_64 (Source RPMs)                                588  B/s | 512  B     00:00    
Dependencies resolved.
==============================================================================================================================
 Package            Architecture          Version                          Repository                                    Size
==============================================================================================================================
Installing:
 zsh                x86_64                5.5.1-6.el8_1.2                  rhel-8-for-x86_64-baseos-rpms                2.9 M

Transaction Summary
==============================================================================================================================
Install  1 Package

Total download size: 2.9 M
Installed size: 7.2 M
Is this ok [y/N]: y
Downloading Packages:
zsh-5.5.1-6.el8_1.2.x86_64.rpm                                                                1.6 MB/s | 2.9 MB     00:01    
------------------------------------------------------------------------------------------------------------------------------
Total                                                                                         1.6 MB/s | 2.9 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                      1/1 
  Installing       : zsh-5.5.1-6.el8_1.2.x86_64                                                                           1/1 
  Running scriptlet: zsh-5.5.1-6.el8_1.2.x86_64                                                                           1/1 
  Verifying        : zsh-5.5.1-6.el8_1.2.x86_64                                                                           1/1 
Installed products updated.

Installed:
  zsh-5.5.1-6.el8_1.2.x86_64                                                                                                  

Complete!

Notice the "loaded plugin" message no longer appear. Since this is no longer an issue in the current RHEL 8 streams. 

Considering the current RHEL 7 life cycle, we wont be able to provide this update in RHEL 7 streams. 

Hence closing the bug was wont fix.