Bug 1145134 - migrate-rhs-classic-to-rhsm --rhn-to-rhsm is broken
Summary: migrate-rhs-classic-to-rhsm --rhn-to-rhsm is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: RHGS 2.1.5
Assignee: Stanislav Graf
QA Contact: Prasanth
URL:
Whiteboard:
Depends On: 1147947
Blocks: 1147095
TreeView+ depends on / blocked
 
Reported: 2014-09-22 12:54 UTC by Prasanth
Modified: 2015-05-15 18:15 UTC (History)
12 users (show)

Fixed In Version: rhsc-branding-rhs-2.1.6-1.0.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, the "migrate-rhs-classic-to-rhsm" script failed and users were unable to migrate from Red Hat Storage 2.1 to Red Hat Storage 3.0. With this fix, the "migrate-rhs-classic-to-rhsm" script runs successfully in both Red Hat Enterprise Linux 6.5 and Red Hat Enterprise Linux 6.6 environments and the migration is successful.
Clone Of:
Environment:
Last Closed: 2014-10-28 14:41:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1723 0 normal SHIPPED_LIVE Red Hat Storage Console 2.1 bug fix update 2014-10-28 18:41:00 UTC

Description Prasanth 2014-09-22 12:54:50 UTC
Description of problem:

migrate-rhs-classic-to-rhsm --rhn-to-rhsm is broken

------------
# migrate-rhs-classic-to-rhsm --rhn-to-rhsm
Starting migration to RHSM...
Red Hat username: qa
Red Hat password: 
Traceback (most recent call last):
  File "/usr/bin/migrate-rhs-classic-to-rhsm", line 500, in <module>
    main()
  File "/usr/bin/migrate-rhs-classic-to-rhsm", line 496, in main
    rhn_to_rhsm()
  File "/usr/bin/migrate-rhs-classic-to-rhsm", line 161, in rhn_to_rhsm
    rhn_migrate_classic_to_rhsm()
  File "/usr/bin/migrate-rhs-classic-to-rhsm", line 125, in rhn_migrate_classic_to_rhsm
    migrate.MigrationEngine().main(args=["--force"])
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 760, in main
    self.cp = self.get_candlepin_basic_auth_connection(self.secreds.username, self.secreds.password)
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 275, in get_candlepin_basic_auth_connection
    self.cp_provider = inj.require(inj.CP_PROVIDER)
  File "/usr/share/rhsm/subscription_manager/injection.py", line 102, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/usr/share/rhsm/subscription_manager/injection.py", line 72, in require
    raise KeyError("Unknown feature: %r" % feature)
KeyError: "Unknown feature: 'CP_PROVIDER'"
------------


Version-Release number of selected component (if applicable):
# rpm -qa |grep subscription-manager*
subscription-manager-migration-1.12.14-7.el6.x86_64
subscription-manager-1.12.14-7.el6.x86_64
subscription-manager-migration-data-2.0.13-1.el6.noarch

How reproducible: 100%


Steps to Reproduce:
1. Perform the upgrade steps using the "migrate-rhs-classic-to-rhsm" script as mentioned in https://documentation-devel.engineering.redhat.com/site/documentation/en-US/Red_Hat_Storage/3/html-single/Console_Installation_Guide/index.html#sect-Upgrading_Red_Hat_Storage_Console
2. migrate-rhs-classic-to-rhsm --rhn-to-rhsm fails with the above mentioned error
3.

Actual results: Script fails to migrate from rhn to rhsm


Expected results: migrate script should NOT fail


Additional info: More details about this bug will be posted soon

Comment 1 Prasanth 2014-09-22 13:11:03 UTC
Based on my testing, looks like this is happening during the Upgrade testing from errata.stage due to the updates on the following dependent packages which is currently available in Stage:

----
subscription-manager-migration-1.12.14-7.el6.x86_64
subscription-manager-1.12.14-7.el6.x86_64
subscription-manager-migration-data-2.0.13-1.el6.noarch
----

The same script works fine with the following versions, if installed from RHN Live. 

------
subscription-manager-migration-data-2.0.5-1.el6.noarch
subscription-manager-1.9.11-1.el6.x86_64
subscription-manager-migration-1.9.11-1.el6.x86_64
------

So, if that is true, this issue will be seen by the customers once the related Errata having the updates for "subscription-manager-migration-*" is out, which would prevent them from using the migrate script.

Comment 2 Prasanth 2014-09-22 13:25:37 UTC
This is seen during Upgrading Red Hat Storage Console 2.1 Update 4 to Red Hat Storage Console 3.0 using the "migrate-rhs-classic-to-rhsm" script

Comment 6 Stanislav Graf 2014-09-30 11:31:45 UTC
Reproduction report
===================
Successfully reproduced the issue. The script fails before it is able to do any changes to the system. System is still registered to RHN and configured for RHS Console 2.1. -> System is in original state.

Workaround
==========
Temporary downgrade subscription-manager:
# yum downgrade subscription-manager-1.9.11-1.el6 subscription-manager-migration-1.9.11-1.el6

Then continue according to documentation.

Note: 'yum update' in Step 9 of "Procedure 3.7. Upgrading Red Hat Storage Console 2.1 Update 4 to Red Hat Storage Console 3.0 using Subscription Manager" will make sure you have back the latest subscription-manager (after your successfull migration).

Comment 13 Prasanth 2014-10-16 14:01:29 UTC
Verified in rhsc-branding-rhs-2.1.6-1.0.el6rhs

Comment 15 Shalaka 2014-10-27 11:33:03 UTC
Edited the doc text. Please review and sign-off.

Comment 16 Stanislav Graf 2014-10-27 12:25:51 UTC
(In reply to Shalaka from comment #15)
> Edited the doc text. Please review and sign-off.

Thanks. Looks good to me.

Comment 18 errata-xmlrpc 2014-10-28 14:41:09 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://rhn.redhat.com/errata/RHBA-2014-1723.html


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