Bug 818383 - Yum Plugin usability Improvements
Yum Plugin usability Improvements
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
urgent Severity unspecified
: rc
: ---
Assigned To: Chris Duryee
Entitlement Bugs
: ZStream
Depends On:
Blocks: 771481 826616 829426 832119
  Show dependency treegraph
 
Reported: 2012-05-02 18:28 EDT by Bryan Kearney
Modified: 2014-07-11 10:24 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 826616 832119 (view as bug list)
Environment:
Last Closed: 2012-12-10 16:41:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryan Kearney 2012-05-02 18:28:08 EDT
Per a usability discussion, the yum plugin should be enhanced to provide the following messaging:

If not registered to either next gen or classic: MSG1
If registered to nextgen, but no subscrptions have been consumed: MSG2
If registered and subscriptions have expired, MSG3
if there are subscirptions for next gen which are active: MSG4
If registered to classic, log nothing.

MSG1: This machine has not been registered to RHN. It is important that you register in order to access to security and other critical updates. Please use subscription-manager register in order to register this machine.

MSG2: This machine has been registered to RHN, but has not consumed It is important that you register in order to access to security and other critical updates. Please use subscription-manager subscribe in order to apply subscriptions to this machine.

MSG3: Existing expired message.

MSG4: This machine is covered by subscriptions. Please use XXX to enable the repos. XXX should reflect what is in the docs.
Comment 4 Suzanne Yeghiayan 2012-05-18 16:54:56 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 6 Chris Duryee 2012-05-30 14:03:08 EDT
37db8ccbec master 1.0.3+
Comment 7 John Sefler 2012-06-01 14:01:57 EDT
Preliminary testing of comment 6 using a continuous integration build...
[root@jsefler-r63-server ~]# rpm -q subscription-manager
subscription-manager-0.99.19.1-1.git.0.f2c9f6d.el6.x86_64


[root@jsefler-r63-server ~]# subscription-manager config --server.hostname subscription.rhn.stage.redhat.com

Testing Case MSG1.............................................

[root@jsefler-r63-server ~]# subscription-manager unregister
This system is currently not registered.
[root@jsefler-r63-server ~]# rm /etc/sysconfig/rhn/systemid
rm: cannot remove `/etc/sysconfig/rhn/systemid': No such file or directory
[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity

This machine has not been registered and therefore has
no access to security and other critical updates. Please
register using subscription-manager.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-r63-server ~]# 

^^^^ VERIFIED, MSG1 is displayed as well as its corresponding message from RHN Classic.


Testing Case MSG2.............................................

[root@jsefler-r63-server ~]# subscription-manager register --username stage_test_12
Password: 
The system has been registered with id: 353d098a-d6a6-406e-8f69-a33efd7e9f07 
[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.

This machine has been registered to RHN, but has no
subscriptions applied. Please use subscription-manager
in order to enable access to security and other
critical updates.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-r63-server ~]# 

^^^^ VERIFIED/FAILED, MSG2 is displayed as well as a contradictory message from the rhnplugin.


Testing Case MSG3.............................................

[root@jsefler-r63-server ~]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@jsefler-r63-server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	04/27/2012               
Expires:              	04/26/2013    

[root@jsefler-r63-server ~]# date 050100002013
Wed May  1 00:00:00 EDT 2013
[root@jsefler-r63-server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Expired                  
Starts:               	                         
Expires:              	                         

[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.
certificate verify failed
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-r63-server ~]# 

^^^^ NOT YET VERIFIED. I SEEM TO BE BLOCKED BY A CONSUMER CERT VALIDITY ISSUE. see Bug 827530


Testing Case MSG4.............................................

[root@jsefler-r63-server ~]# date 060113482012
Fri Jun  1 13:48:00 EDT 2012
[root@jsefler-r63-server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	04/27/2012               
Expires:              	04/26/2013               

[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.

This machine is using certificate-based subscription
management. Please use yum-config-manager to configure
which software repositories are active.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repo id                       repo name                                   status
rhel-6-server-cf-tools-1-rpms Red Hat CloudForms Tools for RHEL 6 (RPMs)     25
rhel-6-server-rpms            Red Hat Enterprise Linux 6 Server (RPMs)    7,262
rhel-server-dts-6-rpms        Red Hat Developer Toolset RPMs for Red Hat      0
repolist: 7,287
[root@jsefler-r63-server ~]# 


^^^ VERIFIED MSG4 However, running yum-config-manager does not load the subscription-manager plugin.  Is that what we want?
Comment 9 John Sefler 2012-06-01 18:32:13 EDT
Since the yum subscription-manager plugin is also aware when the system is registered using the RHN Classic tooling, we should also verify that the MSGs are not displayed at when already registered classically...

[root@jsefler-r63-server ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa@redhat.com --password=***** --force --norhnsd --nohardware --nopackages --novirtinfo
[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
repo id              repo name                                            status
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86 6,733
repolist: 6,733
[root@jsefler-r63-server ~]#

^^^ VERFIIED: MSG1 IS NOT DISPLAYED.  RHN CLASSIC REGISTRATION TAKES PRECEDENCE.

[root@jsefler-r63-server ~]# subscription-manager register --username qa@redhat.com
WARNING

This system has already been registered with RHN using RHN Classic technology.

The tool you are using is attempting to re-register using RHN Certificate-Based technology. Red Hat recommends (except in a few cases) that customers only register with RHN once.

To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
Password: 
The system has been registered with id: 3cd80a39-509e-4e16-8a80-a2a705b1feb3 
[root@jsefler-r63-server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.
repo id              repo name                                            status
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86 6,733
repolist: 6,733
[root@jsefler-r63-server ~]# 

^^^ VERIFIED: MSG2 IS NOT DISPLAYED WHEN REGISTERED USING BOTH TECHNOLOGIES.
Comment 10 Chris Duryee 2012-06-05 14:20:46 EDT
61d499c5 RHEL6.3.z 0.99.19.2
Comment 11 John Sefler 2012-06-05 17:01:08 EDT
Preliminary testing of comment 10 using a continuous integration build...
[root@jsefler-63server ~]# rpm -q subscription-manager
subscription-manager-0.99.19.2-1.git.0.9bb9643.el6.x86_64


Testing Case MSG1.............................................
If not registered to either next gen or classic: MSG1

[root@jsefler-63server ~]# subscription-manager unregister
This system is currently not registered.
[root@jsefler-63server ~]# rm /etc/sysconfig/rhn/systemid
rm: cannot remove `/etc/sysconfig/rhn/systemid': No such file or directory
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity

This machine has not been registered and therefore has
no access to security and other critical updates. Please
register using subscription-manager.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-63server ~]# 

^^^^ VERIFIED, MSG1 is displayed from subscription-manager plugin as well as the corresponding rhnplugin message from RHN Classic.


Testing Case MSG2.............................................
If registered to nextgen, but no subscrptions have been consumed: MSG2

[root@jsefler-63server ~]# subscription-manager config --server.hostname subscription.rhn.stage.redhat.com
[root@jsefler-63server ~]# subscription-manager register --username stage_test_12
Password: 
The system has been registered with id: b3e7c79c-1999-4334-8dfa-a6cb3a416520 
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.

This system has been registered to Red Hat Subscription
Management, but has no subscriptions applied. Please use
subscription-manager in order to enable access to security
and other critical updates.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-63server ~]# 

^^^^ VERIFIED, A less contradictory version of MSG2 as agreed upon via email thread is now displayed from subscription-manager plugin while the rhnplugin message continues to state that the system is not registered with RHN.


Testing Case MSG3.............................................
If registered and subscriptions have expired, MSG3

[root@jsefler-63server ~]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@jsefler-63server ~]# subscription-manager list --installed | grep Expires
Expires:              	04/26/2013               
[root@jsefler-63server ~]# date 050100002013
Wed May  1 00:00:00 EDT 2013
[root@jsefler-63server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Expired                  
Starts:               	                         
Expires:              	                         

[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.

This system has been registered to Red Hat Subscription
Management, but has no subscriptions applied. Please use
subscription-manager in order to enable access to security
and other critical updates.


*** WARNING ***
The subscription for following product(s) has expired:
  - Red Hat Developer Toolset (for RHEL Server)
  - Red Hat Enterprise Linux Server
You no longer have access to the repositories that
provide these products.  It is important that you apply an
active subscription in order to resume access to security
and other critical updates. If you don't have other active
subscriptions, you can renew the expired subscription.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repolist: 0
[root@jsefler-63server ~]# 

^^^^ VERIFIED, MSG3 is displayed warning us of our expired subscriptions.  MSG1 is also displayed and is true for this verification test.  Finally, the rhnplugin message continues to state that the system is not registered with RHN.


Testing Case MSG4.............................................
if there are subscirptions for next gen which are active: MSG4

[root@jsefler-63server ~]# date 060516122012
Tue Jun  5 16:12:00 EDT 2012
[root@jsefler-63server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	04/27/2012               
Expires:              	04/26/2013               

[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.

Please use yum-config-manager to configure which software
repositories are used with Red Hat Subscription Management.

This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
repo id                        repo name                                                             status
rhel-6-server-cf-tools-1-rpms  Red Hat CloudForms Tools for RHEL 6 (RPMs)                               25
rhel-6-server-rpms             Red Hat Enterprise Linux 6 Server (RPMs)                              8,169
rhel-server-dts-6-rpms         Red Hat Developer Toolset RPMs for Red Hat Enterprise Linux 6 Server      0
repolist: 8,194
[root@jsefler-63server ~]# 

^^^^ VERIFIED, A modified version of MSG4 as agreed upon via email thread is now displayed from subscription-manager plugin while the rhnplugin message continues to state that the system is not registered with RHN.



Testing Case no-MSG.............................................
If registered to classic, log nothing.

[root@jsefler-63server ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa@redhat.com --password=**** --force --norhnsd --nohardware --nopackages --novirtinfo
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
repo id                        repo name                                                             status
rhel-6-server-cf-tools-1-rpms  Red Hat CloudForms Tools for RHEL 6 (RPMs)                               25
rhel-6-server-rpms             Red Hat Enterprise Linux 6 Server (RPMs)                              8,169
rhel-server-dts-6-rpms         Red Hat Developer Toolset RPMs for Red Hat Enterprise Linux 6 Server      0
rhel-x86_64-server-6           Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)              6,733
repolist: 14,927
[root@jsefler-63server ~]# subscription-manager list --installed | grep Expires
Expires:              	04/26/2013               
[root@jsefler-63server ~]# date 050100002013
Wed May  1 00:00:00 EDT 2013
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
rhel-x86_64-server-6                                                                | 1.6 kB     00:00     
repo id                         repo name                                                            status
rhel-x86_64-server-6            Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)             6,733
repolist: 6,733
[root@jsefler-63server ~]# date 060516122012
Tue Jun  5 16:12:00 EDT 2012
[root@jsefler-63server ~]# subscription-manager list --consumed | grep Serial
Serial Number:        	7854203238924250310      
Serial Number:        	7854203238924250310      
[root@jsefler-63server ~]# subscription-manager unsubscribe --serial=7854203238924250310
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
repo id                         repo name                                                            status
rhel-x86_64-server-6            Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)             6,733
repolist: 6,733
[root@jsefler-63server ~]# subscription-manager unregister
System has been un-registered.
[root@jsefler-63server ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
repo id                         repo name                                                            status
rhel-x86_64-server-6            Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)             6,733
repolist: 6,733
[root@jsefler-63server ~]# 

^^^^ VERIFIED, When registered with RHN classically, the subscription-manager yum plugin did not print MSG1 MSG2 MSG3 or MSG4.  

ALL TEST CASES VERIFIED
Comment 15 John Sefler 2012-10-25 17:24:20 EDT
The behavior requested in this bug has been overridden by newer bug 830193.
Comment 16 John Sefler 2012-11-19 10:06:48 EST
As stated in comment 15, the subscription-manager yum plugin feedback has been updated and tested during the rhel59 test cycle; see https://bugzilla.redhat.com/show_bug.cgi?id=830193#c12
Those same assertions in bug 830193 have since been automated and have most recently passed against the following build targeted for rhel64; subscription-manager-1.1.7-1.git.1.e32d8f0.el6.x86_64

Moving this bug to VERIFIED.
Comment 17 Bryan Kearney 2012-12-10 16:41:23 EST
Bug Clean Up, these are in the current release.
Comment 18 John Sefler 2014-07-11 10:24:18 EDT
Update...
Bug 1058380 removes some of these "Yum Plugin usability Improvements" in subscription-manager-1.12.2+

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