Hide Forgot
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:
Committed 502767abd7086e99780108b46eb2b68cd4c605bc subscription-manager-0.99.6+
Fix was also merged to RHEL5.8 branch Commit f45a14868053c2c6de1dff4d518f8f600d996258 subscription-manager-0.98.16+
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.
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.
This was committed to the 6.3 branch. Cloned for 5.9.
This was a missunderstanding on my part. My appolagies. Reverting the bug back to 5.9.
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!
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