Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1788297

Summary: duplicate messages are being reported by the yum plugin for subscription-manager
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: high    
Version: 7.8CC: candlepin-bugs, csnyder, redakkan, wpoteat
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.24.25-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 19:41:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1807872    
Bug Blocks: 1744146    

Description John Sefler 2020-01-06 21:56:57 UTC
Description of problem:

---------------------------------------------
When not yet registered, the yum plugin reports duplicated messages...

[root@kvm-02-guest01 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.


This system is not registered with an entitlement server. You can use subscription-manager to register.

repolist: 0


---------------------------------------------
Likewise when registered and unsubscribed, the yum plugin reports duplicate messages...

[root@kvm-02-guest01 ~]# yum repolist all
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.


This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

repolist: 0





Version-Release number of selected component (if applicable):
[root@kvm-02-guest01 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.23-1.el7


How reproducible:


Steps to Reproduce:
[root@kvm-02-guest01 ~]# subscription-manager register --username stage_auto_testuser --serverurl=subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: ff080bdb-ba3e-4bec-a78b-9da813ba3ff1
The registered system name is: kvm-02-guest01.lab.eng.rdu2.redhat.com
[root@kvm-02-guest01 ~]# 
[root@kvm-02-guest01 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.


This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

repolist: 0
[root@kvm-02-guest01 ~]# 
[root@kvm-02-guest01 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.
[root@kvm-02-guest01 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.


This system is not registered with an entitlement server. You can use subscription-manager to register.

repolist: 0
[root@kvm-02-guest01 ~]# 




Actual results:
Duplicate messages to stdout

Expected results:


Additional info:

I suspect the cause lies in these adjacent debugging messages logged to rhsm.log

[root@kvm-02-guest01 ~]# tail -f /var/log/rhsm/rhsm.log 

2020-01-06 16:52:39,229 [DEBUG] yum:31433:MainThread @__init__.py:92 - Searching for content of type: yum
2020-01-06 16:52:39,229 [DEBUG] yum:31433:MainThread @__init__.py:92 - Searching for content of type: deb

Comment 7 Rehana 2020-01-13 09:54:03 UTC
Reproducing the failure: 

subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.23-1.el7

1) Reproducing duplicate error on a registered machine

[root@kvm-01-guest14 ~]# subscription-manager register --username=****
You are attempting to use a locale that is not installed.
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 8e64b7fc-1cb8-4e3c-a26e-3a7d575ea1ea
The registered system name is: kvm-01-guest14.rhts.eng.tlv.redhat.com
[root@kvm-01-guest14 ~]# yum repolist
Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

repolist: 0

2) Reproducing the duplicate error messages on unregistered machine 

[root@kvm-01-guest14 ~]# subscription-manager unregister
You are attempting to use a locale that is not installed.
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.

[root@kvm-01-guest14 ~]# yum repolist
Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
This system is not registered with an entitlement server. You can use subscription-manager to register.

repolist: 0

Comment 8 Rehana 2020-01-13 10:01:05 UTC
Verifying on :
=============

subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.25-1.el7


# rpm -q subscription-manager --changelog | grep 1788297 -A2
- 1788297: Duplicate messages are being reported by the yum plugin for
  subscription-manager (wpoteat)

1) 
[root@kvm-04-guest24 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

repolist: 0
^^ only single error message appears on a unregistered system.

2) On a registered machine :

[root@kvm-04-guest24 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
repolist: 0

Based on the above observations moving the bug to Verified.

Comment 10 errata-xmlrpc 2020-03-31 19:41:01 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/RHBA-2020:1028