Description of problem: There is a special case for migration whereby the product cert for 180.pem (Red Hat Beta) should not be migrated/copied/installed when a product cert for 176,177,178,179 (Red Hat Developer Toolset) is also migrated/copied/installed. The problem with the current implementation of this special case is that the migration tool waits until after an autosubscribe is attempted before removing the already installed 180.pem. By waiting until after autosubscribe is attempted, there is potential for getting an entitlement to a product that suddenly disappears. The copying of 180.pem should be purged before the autosubscribe is attempted. Version-Release number of selected component (if applicable): [root@jsefler-rhel59 ~]# rpm -q subscription-manager-migration subscription-manager-migration-data subscription-manager-migration-1.0.14-1.git.16.fec8200.el5 subscription-manager-migration-data-1.11.2.3-1.git.0.861f9ba.el5 How reproducible: Steps to Reproduce: 1. register to rhn classic 2. consume channels for product 180 (e.g.rhel-x86_64-server-dts-5-beta) and (179,178,177,or 176) (e.g. rhel-x86_64-server-dts-5) 3. rhn-migrate-classic-to-rhsm Actual results: Following is an excerpt pasted from an automated test showing that autosubscribe during migration encounterted the Red Hat Beta product and then later it disappered from the installed products. Commentary is in bold.... 201208231701:57.482 - WARNING: SPECIAL CASE ENCOUNTERED: rhn-migrate-classic-to-rhsm should NOT install product cert 180 [Red Hat Beta] when product cert 176 [Red Hat Developer Toolset (for RHEL Server)] is also installed. (com.redhat.qe.sm.cli.tests.MigrationTests.getExpectedMappedProductCertFilenamesCorrespondingToChannels) 201208231701:57.483 - FINE: ssh root.redhat.com rhn-migrate-classic-to-rhsm.tcl "-f" "qa" "redhatqa" "null" "null" "null" (com.redhat.qe.tools.SSHCommandRunner.run) 201208231702:38.608 - FINE: Stdout: spawn rhn-migrate-classic-to-rhsm -f Red Hat account: qa Password: Retrieving existing RHN Classic subscription information ... +----------------------------------+ System is currently subscribed to: +----------------------------------+ rhel-x86_64-server-5 rhel-x86_64-server-5-beta rhel-x86_64-server-dts-5-beta rhel-x86_64-server-dts-5-debuginfo rhel-x86_64-server-dts-5 rhel-x86_64-server-5-cf-tools-1-debuginfo rhel-x86_64-server-5-cf-tools-1-beta-debuginfo rhel-x86_64-server-5-beta-debuginfo rhel-x86_64-server-5-debuginfo rhel-x86_64-server-5-cf-tools-1-beta rhel-x86_64-server-5-cf-tools-1 rhel-x86_64-rhev-agent-5-server-beta rhel-x86_64-rhev-agent-5-server rhel-x86_64-server-5-mrg-management-2 rhel-x86_64-server-5-mrg-grid-execute-2 rhel-x86_64-server-5-mrg-grid-2 rhel-x86_64-server-5-mrg-messaging-2 rhel-x86_64-server-rhev-hdk-2-5 rhel-x86_64-server-rhev-hdk-2-5-beta rhel-x86_64-server-5-mrg-grid-execute-1-beta rhel-x86_64-server-5-mrg-grid-execute-1 rhel-x86_64-server-5-mrg-management-1-beta rhel-x86_64-server-5-mrg-grid-1-beta rhel-x86_64-server-5-mrg-realtime-1-beta rhel-x86_64-server-5-mrg-messaging-1-beta rhel-x86_64-server-5-mrg-messaging-base-1-beta rhel-x86_64-server-5-mrg-management-1 rhel-x86_64-server-5-mrg-grid-1 rhel-x86_64-server-5-mrg-realtime-1 rhel-x86_64-server-5-mrg-messaging-1 rhel-x86_64-server-5-mrg-messaging-base-1 rhel-x86_64-server-hpc-5-beta rhn-tools-rhel-x86_64-server-5 rhn-tools-rhel-x86_64-server-5-beta rhel-x86_64-server-rhsclient-5 rhel-x86_64-server-dts-5-beta-debuginfo +--------------------------------------------------+ Unrecognized channels. Channel to product certificate mapping missing for these channels. +--------------------------------------------------+ rhel-x86_64-server-5-cf-tools-1-debuginfo rhel-x86_64-server-5-cf-tools-1-beta-debuginfo rhel-x86_64-server-5-mrg-management-2 rhel-x86_64-server-5-mrg-grid-execute-2 rhel-x86_64-server-5-mrg-grid-2 rhel-x86_64-server-5-mrg-messaging-2 rhel-x86_64-server-rhev-hdk-2-5 rhel-x86_64-server-rhev-hdk-2-5-beta rhel-x86_64-server-5-mrg-grid-execute-1-beta rhel-x86_64-server-5-mrg-grid-execute-1 rhel-x86_64-server-5-mrg-management-1-beta rhel-x86_64-server-5-mrg-grid-1-beta rhel-x86_64-server-5-mrg-realtime-1-beta rhel-x86_64-server-5-mrg-messaging-1-beta rhel-x86_64-server-5-mrg-messaging-base-1-beta rhel-x86_64-server-5-mrg-management-1 rhel-x86_64-server-5-mrg-grid-1 rhel-x86_64-server-5-mrg-realtime-1 rhel-x86_64-server-5-mrg-messaging-1 rhel-x86_64-server-5-mrg-messaging-base-1 rhel-x86_64-server-hpc-5-beta rhn-tools-rhel-x86_64-server-5 rhn-tools-rhel-x86_64-server-5-beta rhel-x86_64-server-rhsclient-5 List of channels for which certs are being copied rhel-x86_64-server-5 rhel-x86_64-server-5-beta rhel-x86_64-server-dts-5-beta <==== SHOULD NOT BE HERE rhel-x86_64-server-dts-5-debuginfo rhel-x86_64-server-dts-5 rhel-x86_64-server-5-beta-debuginfo rhel-x86_64-server-5-debuginfo rhel-x86_64-server-5-cf-tools-1-beta rhel-x86_64-server-5-cf-tools-1 rhel-x86_64-rhev-agent-5-server-beta rhel-x86_64-rhev-agent-5-server rhel-x86_64-server-dts-5-beta-debuginfo <==== SHOULD NOT BE HERE Product certificates copied successfully to /etc/pki/product Preparing to unregister system from RHN Classic ... System successfully unregistered from RHN Classic. Attempting to register system to Red Hat Subscription Management ... The system has been registered with id: 0a27f205-e133-471d-91b7-fc9b68406fed System 'jsefler-rhel59.usersys.redhat.com' successfully registered to Red Hat Subscription Management. Attempting to auto-subscribe to appropriate subscriptions ... Installed Product Current Status: Product Name: Red Hat Developer Toolset (for RHEL Server) Status: Not Subscribed Product Name: Red Hat Beta <==== SHOULD NOT BE HERE Status: Subscribed <==== SHOULD NOT BE HERE Product Name: Red Hat Enterprise Linux Server Status: Subscribed Product Name: Red Hat Enterprise Virtualization Status: Not Subscribed Please visit https://access.redhat.com/management/consumers/0a27f205-e133-471d-91b7-fc9b68406fed to view the details, and to make changes if necessary. (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait) 201208231702:47.934 - FINE: ssh root.redhat.com subscription-manager list --installed (com.redhat.qe.tools.SSHCommandRunner.run) 201208231702:51.873 - FINE: Stdout: +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Developer Toolset (for RHEL Server) Product ID: 176 Version: 1.0 Arch: x86_64 Status: Not Subscribed Starts: Ends: Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 5.9 Arch: x86_64 Status: Subscribed Starts: 07/24/2012 Ends: 09/21/2012 Product Name: Red Hat Enterprise Virtualization Product ID: 150 Version: 3.0 Arch: x86_64 Status: Not Subscribed Starts: Ends: <==== Red Hat Beta DISAPPEARED! THAT'S GOOD, BUT ITS ENTITLEMENT REMAINS (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait) 201208231702:51.873 - FINE: Stderr: (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait) 201208231702:51.874 - FINE: ExitCode: 0 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait) IT WOULD REALLY BE BEST FOR THE MIGRATION TOOL TO PURGE 180.pem FOR THIS SPECIAL CASE BEFORE IT SHOWS List of channels for which certs are being copied.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
commit 5d0928252bd30daa3a09ae5e7def9b1683fdd674 Available in subscription-manager-1.0.16-1+
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