Bug 883123
| Summary: | Migration from RHN classic fails to find organization | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Tom McKay <tomckay> |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | CLOSED ERRATA | QA Contact: | IDM QE LIST <seceng-idm-qe-list> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4 | CC: | alikins, bkearney, jsefler, omaciel, tomckay |
| Target Milestone: | rc | ||
| Target Release: | 6.4 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 883121 | Environment: | |
| Last Closed: | 2013-02-21 09:01:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 883121 | ||
| Bug Blocks: | 771481, 816564, 880710, 888457 | ||
|
Description
Tom McKay
2012-12-03 20:19:06 UTC
It looks like Brad fixed the bz#880710 and I have merged it master today. I also do not understand this scenario. According to our documentration, you should always unregister rhn classic before proceeding with registration with subscription-manager. I don't see the step of deleting consumer_id before the last step. Had to use the org label to make it work:
[root@qeclient01 ~]# rhn-migrate-classic-to-rhsm --serverurl=ivanova.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: Administrator
Password:
Org: Simple Org
No such org: Simple Org
[root@qeclient01 ~]# rhn-migrate-classic-to-rhsm --serverurl=ivanova.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: Administrator
Password:
Org: "Simple Org"
No such org: "Simple Org"
[root@qeclient01 ~]# rhn-migrate-classic-to-rhsm --serverurl=ivanova.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: Administrator
Password:
Org: Simple\ Org
No such org: Simple\ Org
[root@qeclient01 ~]# rhn-migrate-classic-to-rhsm --serverurl=ivanova.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: Administrator
Password:
Org: Simple_Org
Environment: DEV
Retrieving existing RHN Classic subscription information ...
+-----------------------------------------------------+
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-6
+-----------------------------------------------------+
Installing product certificates for these RHN Classic channels:
+-----------------------------------------------------+
rhel-x86_64-server-6
Product certificates installed 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: fbfef32d-80ef-4284-a3bc-96a35867fc24
System 'qeclient01.xxx.yyy.zzz' successfully registered to Red Hat Subscription Management.
Attempting to auto-attach to appropriate subscriptions ...
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Subscribed
[root@qeclient01 ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-cf-tools-1-rpms/primary_db | 18 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
rhel-6-server-rpms/primary_db | 17 MB 01:16
repo id repo name status
rhel-6-server-cf-tools-1-rpms Red Hat CloudForms Tools for RHEL 6 (RPMs) 31
rhel-6-server-rpms Red Hat Enterprise Linux 6 Server (RPMs) 8,758
repolist: 8,789
also, does not handle spaces in the environment name:
[root@qeclient02 ~]# rhn-migrate-classic-to-rhsm --serverurl=cloud-qe-2.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: admin
Password:
Org: SAM_QE
Environment: Dev_Env
No such environment: Dev_Env
[root@qeclient02 ~]# subscription-manager environments --org SAM_QE
Username: admin
Password:
+-------------------------------------------+
Environments
+-------------------------------------------+
Name: GA Env
Description:
Name: QE Env
Description:
Name: Dev Env
Description:
[root@qeclient02 ~]# rhn-migrate-classic-to-rhsm --serverurl=cloud-qe-2.xxx.yyy.zzz.com/sam/api
Red Hat account: qa
Password:
System Engine Username: admin
Password:
Org: SAM_QE
Environment: Dev\ Env
No such environment: Dev\ Env
Candlepin:
==========
candlepin=> select * from cp_owner where account='Simple_Org';
id | created | updated | contentprefix | defaultservicelevel | displayname | account | upstr
eam_uuid | parent_owner
----------------------------------+----------------------------+---------------------------+---------------+---------------------+-------------+------------+--------------------------------------+--------------
8a90e0cf3b8a57ac013b8a79cb650001 | 2012-12-11 09:58:55.973-05 | 2012-12-11 10:05:59.49-05 | | | Simple Org | Simple_Org | 535abc2c-349e-40a5-b7e5-43c3664f69e5 |
(1 row)
Seems that passing the environment name (not the label) would work. You still need to use the ORG label though. [root@qeclient02 ~]# rhn-migrate-classic-to-rhsm --serverurl=cloud-qe-2.idm.lab.bos.redhat.com/sam/api Red Hat account: qa Password: System Engine Username: admin Password: Org: SAM_QE Environment: Dev Env Retrieving existing RHN Classic subscription information ... +-----------------------------------------------------+ System is currently subscribed to these RHN Classic Channels: +-----------------------------------------------------+ rhel-x86_64-server-6 +-----------------------------------------------------+ Installing product certificates for these RHN Classic channels: +-----------------------------------------------------+ rhel-x86_64-server-6 Product certificates installed successfully to /etc/pki/product. Preparing to unregister system from RHN Classic ... I feel that the migration script should be consistent and handle both org/env names/labels. Fails QE. * candlepin-0.7.19-1.el6_3.noarch * candlepin-tomcat6-0.7.19-1.el6_3.noarch * elasticsearch-0.19.9-5.el6_3.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.2.1-1h.el6_3.noarch * katello-cli-1.2.4-4h.el6_3.noarch * katello-cli-common-1.2.4-4h.el6_3.noarch * katello-common-1.2.6-6h.el6_3.noarch * katello-configure-1.2.3-1h.el6_3.noarch * katello-glue-candlepin-1.2.6-6h.el6_3.noarch * katello-headpin-1.2.6-6h.el6_3.noarch * katello-headpin-all-1.2.6-6h.el6_3.noarch * katello-selinux-1.2.1-1h.el6_3.noarch * thumbslug-0.0.27-1.el6_3.noarch * thumbslug-selinux-0.0.27-1.el6_3.noarch Moving to subscription manager as 880710 tracks the server side changes. commit 6bd96bb108f44c8cb34d7589e988e057e02cc3ed
Author: Bryan Kearney <bkearney>
Date: Tue Dec 11 15:03:28 2012 -0500
883123: Have the migration code use the name and the label for org and environment lookup.
Verified: * candlepin-0.7.23-1.el6_3.noarch * candlepin-tomcat6-0.7.23-1.el6_3.noarch * elasticsearch-0.19.9-5.el6_3.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.2.1-1h.el6_3.noarch * katello-cli-1.2.1-11h.el6_3.noarch * katello-cli-common-1.2.1-11h.el6_3.noarch * katello-common-1.2.1-10h.el6_3.noarch * katello-configure-1.2.3-1h.el6_3.noarch * katello-glue-candlepin-1.2.1-10h.el6_3.noarch * katello-headpin-1.2.1-10h.el6_3.noarch * katello-headpin-all-1.2.1-10h.el6_3.noarch * katello-selinux-1.2.1-1h.el6_3.noarch * thumbslug-0.0.28-1.el6_3.noarch * thumbslug-selinux-0.0.28-1.el6_3.noarch * subscription-manager-1.1.18-1.el6.x86_64 * subscription-manager-migration-data-1.12.2.6-1.el6.noarch * subscription-manager-migration-1.1.18-1.el6.x86_64 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-0350.html |