Bug 790217 - install-num-migrate-to-rhsm should NOT copy both Desktop (68.pem) and Workstation (71.pem) product certs
Summary: install-num-migrate-to-rhsm should NOT copy both Desktop (68.pem) and Worksta...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771748 790437 795784 807971
TreeView+ depends on / blocked
 
Reported: 2012-02-13 23:01 UTC by John Sefler
Modified: 2013-01-08 03:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the "install-num-migrate-to-rhsm" utility did not work correctly for certain products. Consequently, the utility installed also a superfluous Desktop product certificate when the system was provided with an installation number for a Workstation product and vice versa. With this update, "install-num-migrate-to-rhsm" has been fixed and only the correct product certificate is now installed under these circumstances.
Clone Of:
: 795784 (view as bug list)
Environment:
Last Closed: 2013-01-08 03:48:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description John Sefler 2012-02-13 23:01:06 UTC
Description of problem:
When migrating a disconnected RHEL5 Workstation from RHN Classic to RHSM as outlined in the Deployment Guide section 14.5.4. Migrating a Disconnected System, the install-num-migrate-to-rhsm tool is currently copying two product certs (71.pem and 68.pem).  In fact this is demonstrated in the deployment doc example.  However, we have learned in https://bugzilla.redhat.com/show_bug.cgi?id=786257#c1 that both rhel5 Desktop and Workstation product certs should not be installed simultaneously. Instead, the 
install-num-migrate-to-rhsm should exclude migration of the Desktop (68.pem) product cert when the instnum resolves to Workstation (71.pem).


Version-Release number of selected component (if applicable):
[root@jsefler-onprem-5server rhn]# rpm -q subscription-manager-migration
subscription-manager-migration-0.98.14-1.el5


How reproducible:


Steps to Reproduce:
# install-num-migrate-to-rhsm -d -i da3122afdb7edd23

  
Actual results:
Copying /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-f812997e0eda-71.pem to /etc/pki/product/71.pem
Copying /usr/share/rhsm/product/RHEL-5/Client-Client-x86_64-6587edcf1c03-68.pem to /etc/pki/product/68.pem

Expected results:
Copying /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-f812997e0eda-71.pem to /etc/pki/product/71.pem

Additional info:

Comment 4 Alex Wood 2012-02-14 14:29:01 UTC
Committed 502767abd7086e99780108b46eb2b68cd4c605bc

subscription-manager-0.99.6+

Comment 6 John Sefler 2012-02-14 17:44:16 UTC
Fix was also merged to RHEL5.8 branch
Commit f45a14868053c2c6de1dff4d518f8f600d996258  subscription-manager-0.98.16+

Comment 7 John Sefler 2012-02-14 18:22:27 UTC
Verifying Version...
[root@jsefler-onprem-5server ~]# rpm -q subscription-manager-migration
subscription-manager-migration-0.98.16-1.git.0.488f7dd.el5


Test strategy...
We'll execute install-num-migrate-to-rhsm with three different install numbers:
Case1: base Client only (000000870003fc01)
Case2: base Client with Workstation (000000a4004ffc01)
Case3: base Client with Workstation (da3122afdb7edd23) from comment #0


Case1:
[root@jsefler-onprem-5server ~]# python /usr/lib/python2.4/site-packages/instnum.py 000000870003fc01
Product: RHEL Client
Type: Installer Only
Options: NoSLA FullProd
Allowed CPU Sockets: Unlimited
Allowed Virtual Instances: Unlimited
Package Repositories: Client

key: 0 '000000'
checksum: 135 '87'
options: 257 'NoSLA FullProd'
socklimit: -1 'Unlimited'
virtlimit: -1 'Unlimited'
type: 2 'Installer Only'
product: 1 'client'

{'Base': 'Client'}

0000-0087-0003-fc01
[root@jsefler-onprem-5server ~]# 
[root@jsefler-onprem-5server ~]# install-num-migrate-to-rhsm -d -i 000000870003fc01
Copying /usr/share/rhsm/product/RHEL-5/Client-Client-x86_64-6587edcf1c03-68.pem to /etc/pki/product/68.pem
[root@jsefler-onprem-5server ~]# openssl x509 -text -in /usr/share/rhsm/product/RHEL-5/Client-Client-x86_64-6587edcf1c03-68.pem | egrep 1.3.6.1.4.1.2312.9.1.[[:digit:]]+.1 -A1
            1.3.6.1.4.1.2312.9.1.68.1: 
                . Red Hat Enterprise Linux Desktop
[root@jsefler-onprem-5server ~]# 

^^^ VERIFIED that only the Desktop product cert (68.pem) will be installed.



Case2:
[root@jsefler-onprem-5server ~]# python /usr/lib/python2.4/site-packages/instnum.py 000000a4004ffc01
Product: RHEL Client
Type: Installer Only
Options: Basic FullProd Workstation
Allowed CPU Sockets: Unlimited
Allowed Virtual Instances: Unlimited
Package Repositories: Client Workstation

key: 0 '000000'
checksum: 164 'a4'
options: 4356 'Basic FullProd Workstation'
socklimit: -1 'Unlimited'
virtlimit: -1 'Unlimited'
type: 2 'Installer Only'
product: 1 'client'

{'Workstation': 'Workstation', 'Base': 'Client'}

0000-00a4-004f-fc01
[root@jsefler-onprem-5server ~]# 
[root@jsefler-onprem-5server ~]# install-num-migrate-to-rhsm -d -i 000000a4004ffc01
Copying /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-f812997e0eda-71.pem to /etc/pki/product/71.pem
[root@jsefler-onprem-5server ~]# openssl x509 -text -in /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-f812997e0eda-71.pem | egrep 1.3.6.1.4.1.2312.9.1.[[:digit:]]+.1 -A1
            1.3.6.1.4.1.2312.9.1.71.1: 
                .$Red Hat Enterprise Linux Workstation
[root@jsefler-onprem-5server ~]# 

^^^ VERIFIED that only the Workstation product cert (71.pem) will be installed.



Case 3:
[root@jsefler-onprem-5server ~]# install-num-migrate-to-rhsm -d -i da3122afdb7edd23
Copying /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-f812997e0eda-71.pem to /etc/pki/product/71.pem
[root@jsefler-onprem-5server ~]# 

^^^ VERIFIED that only the Workstation product cert (71.pem) will be installed.

Comment 8 Miroslav Svoboda 2012-02-21 13:22:28 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the "install-num-migrate-to-rhsm" utility did not work correctly for certain products. Consequently, the utility installed also a superfluous Desktop product certificate when the system was provided with an installation number for a Workstation product and vice versa. With this update, "install-num-migrate-to-rhsm" has been fixed and only the correct product certificate is now installed under these circumstances.

Comment 9 Michael Stead 2012-02-21 14:34:32 UTC
This was committed to the 6.3 branch. Cloned for 5.9.

Comment 12 Michael Stead 2012-02-21 16:34:15 UTC
This was a missunderstanding on my part. My appolagies.

Reverting the bug back to 5.9.

Comment 15 John Sefler 2012-08-31 21:18:02 UTC
Re-verifying RHEL59 version...

[root@jsefler-59client ~]# rpm -q subscription-manager-migration subscription-manager-migration-data
subscription-manager-migration-1.0.17-1.el5
subscription-manager-migration-data-1.11.2.4-1.el5


Reverifying the three cases from comment 7...

Case1: base Client only (000000870003fc01)
[root@jsefler-59client ~]# rm -rf /etc/pki/product/*
[root@jsefler-59client ~]# install-num-migrate-to-rhsm -i 000000870003fc01
Installing /usr/share/rhsm/product/RHEL-5/Client-Client-x86_64-a9724c3ee9c1-68.pem to /etc/pki/product/68.pem
[root@jsefler-59client ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Desktop
Product ID:           	68
Version:              	5.9
Arch:                 	x86_64
Status:               	Not Subscribed
Starts:               	
Ends:                 	



Case2: base Client with Workstation (000000a4004ffc01)
[root@jsefler-59client ~]# rm -rf /etc/pki/product/*
[root@jsefler-59client ~]# install-num-migrate-to-rhsm -i 000000a4004ffc01
Installing /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-e2ad901ddaca-71.pem to /etc/pki/product/71.pem
[root@jsefler-59client ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Workstation
Product ID:           	71
Version:              	5.9
Arch:                 	x86_64
Status:               	Not Subscribed
Starts:               	
Ends:                 	



Case3: base Client with Workstation (da3122afdb7edd23)
[root@jsefler-59client ~]# rm -rf /etc/pki/product/*
[root@jsefler-59client ~]# install-num-migrate-to-rhsm -i da3122afdb7edd23
Installing /usr/share/rhsm/product/RHEL-5/Client-Workstation-x86_64-e2ad901ddaca-71.pem to /etc/pki/product/71.pem
[root@jsefler-59client ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Workstation
Product ID:           	71
Version:              	5.9
Arch:                 	x86_64
Status:               	Not Subscribed
Starts:               	
Ends:      


VERIFIED: IN ALL THREE CASES, EITHER PRODUCT 68 OR 71 IS APPROPRIATELY INSTALLED, BUT NOT BOTH!

Comment 17 errata-xmlrpc 2013-01-08 03:48:59 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.

http://rhn.redhat.com/errata/RHBA-2013-0033.html


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