Bug 875153
Summary: | rhn-migrate-classic-to-rhsm leaves system unregistered when a non-existant environment is specified/mistyped | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Adrian Likins <alikins> |
Component: | subscription-manager | Assignee: | Adrian Likins <alikins> |
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, mreid, omaciel, spandey |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | subscription-manager-1.1.4-1 | Doc Type: | Known Issue |
Doc Text: |
During the migration process, the rhn-migrate-classic-to-rhsm utility leaves the system unregistered when a non-existent environment is specified or mistyped. The registration process consequently fails with a No such environment error message.
|
Story Points: | --- |
Clone Of: | 866579 | Environment: | |
Last Closed: | 2013-02-21 09:00:22 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: | 866579 | ||
Bug Blocks: | 771481 |
Comment 2
John Sefler
2012-11-19 16:07:48 UTC
(In reply to comment #2) > Attempting to re-verify, we ran into some key/name/label confusion that has > blocked us from a successful migration to a cfse server with credentials to > a specific org and a specific environment. > > Prior to running the migrations, we check the available orgs and the > environments on the CFSE server... > > > # subscription-manager orgs --username admin --password admin > > +-------------------------------------------+ > > admin Organizations > > +-------------------------------------------+ > > > > Name: SAM QE > > Key: SAM_QE > > > > Name: ACME_Corporation > > Key: ACME_Corporation > > > > > > # subscription-manager environments --org "SAM QE" --username admin > > --password admin > > +-------------------------------------------+ > > Environments > > +-------------------------------------------+ > > Name: GA > > Description: > > > > Name: QE > > Description: > > > > Name: DEV > > Description: > > Notice above that the available org's Name and Key differ (which is > acceptable), and that in order to see the environments available to the org, > we had to pass the org's Name (did not expect that; thought the key is what > should have been passed; there is no indication in the online help what > should be passed - name or key or label?). > > # subscription-manager environments --help | grep ORG > > --org=ORG specify organization for environment list > We can update the strings to be more specific, but the fact that we aren't consistent in what we ask for (needing key most places, but needing name in environment --org) to complete these commands is worrisome. This bug is partially blocked by bug 880710 String/description clarifications will be handled by bug 878097 Verifying Version... [root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager-migration subscription-manager-migration-1.1.18-1.el6.x86_64 Against... Subscription Asset Manager Version: 1.2.1-10h.el6_3 [root@rhsm-accept-rhel6 ~]# rpm -Uvh http://qeblade3.rhq.lab.eng.bos.redhat.com/pub/candlepin-cert-consumer-qeblade3.rhq.lab.eng.bos.redhat.com-1.0-1.noarch.rpm Retrieving http://qeblade3.rhq.lab.eng.bos.redhat.com/pub/candlepin-cert-consumer-qeblade3.rhq.lab.eng.bos.redhat.com-1.0-1.noarch.rpm Preparing... ########################################### [100%] 1:candlepin-cert-consumer########################################### [100%] [root@rhsm-accept-rhel6 ~]# subscription-manager orgs --username admin Password: +-------------------------------------------+ admin Organizations +-------------------------------------------+ Name: SAM QE Key: SAM_QE Name: ACME_Corporation Key: ACME_Corporation [root@rhsm-accept-rhel6 ~]# subscription-manager environments --org SAM_QE --username admin Password: +-------------------------------------------+ Environments +-------------------------------------------+ Name: Dev Env <==== NOTE: Label/Key is Dev_Env Description: Development Name: QE Env <==== NOTE: Label/Key is QE_Env Description: [root@rhsm-accept-rhel6 ~]# [root@rhsm-accept-rhel6 ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=**** --force --norhnsd --nohardware --nopackages --novirtinfo [root@rhsm-accept-rhel6 ~]# rhn-channel --list rhel-x86_64-server-6 [root@rhsm-accept-rhel6 ~]# ls /etc/sysconfig/rhn/systemid /etc/sysconfig/rhn/systemid [root@rhsm-accept-rhel6 ~]# subscription-manager list --installed No installed products to list Case 1: user mistypes the org during migration... [root@rhsm-accept-rhel6 ~]# rhn-migrate-classic-to-rhsm --no-autoRed Hat account: qa Password: System Engine Username: admin Password: Org: foo No such org: foo [root@rhsm-accept-rhel6 ~]# rhn-channel --list rhel-x86_64-server-6 [root@rhsm-accept-rhel6 ~]# ls /etc/sysconfig/rhn/systemid /etc/sysconfig/rhn/systemid ^^^ VERIFIED: Still registered classically when org is mistyped Case 2: user mistypes the env during migration... [root@rhsm-accept-rhel6 ~]# rhn-migrate-classic-to-rhsm --no-auto Red Hat account: qa Password: System Engine Username: admin Password: Org: SAM_QE Environment: foo No such environment: foo [root@rhsm-accept-rhel6 ~]# rhn-channel --list rhel-x86_64-server-6 [root@rhsm-accept-rhel6 ~]# ls /etc/sysconfig/rhn/systemid /etc/sysconfig/rhn/systemid ^^^ VERIFIED: Still registered classically when env is mistyped Case 3: user correctly enters org and env during migration... [root@rhsm-accept-rhel6 ~]# rhn-migrate-classic-to-rhsm --no-auto Red Hat account: qa Password: System Engine Username: admin Password: Org: SAM_QE Environment: QE_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 ... System successfully unregistered from RHN Classic. Attempting to register system to Red Hat Subscription Management ... The system has been registered with id: ea4516d6-04e4-4303-bd4e-c96e7c374373 System 'rhsm-accept-rhel6.usersys.redhat.com' successfully registered to Red Hat Subscription Management. [root@rhsm-accept-rhel6 ~]# rhn-channel --list Unable to locate SystemId file. Is this system registered? [root@rhsm-accept-rhel6 ~]# ls /etc/sysconfig/rhn/systemid ls: cannot access /etc/sysconfig/rhn/systemid: No such file or directory [root@rhsm-accept-rhel6 ~]# subscription-manager identity Current identity is: ea4516d6-04e4-4303-bd4e-c96e7c374373 name: rhsm-accept-rhel6.usersys.redhat.com org name: SAM QE org id: SAM_QE [root@rhsm-accept-rhel6 ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 6.4 Arch: x86_64 Status: Not Subscribed Starts: Ends: VERIFIED: A successful migration from RHN Classic to SAM even after mistyping org and env keys. Let's test again using the org and env name (instead of key)... [root@rhsm-accept-rhel6 ~]# subscription-manager unregister System has been un-registered. [root@rhsm-accept-rhel6 ~]# rm -f /etc/pki/product/* [root@rhsm-accept-rhel6 ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=redhatqa --force --norhnsd --nohardware --nopackages --novirtinfo [root@rhsm-accept-rhel6 ~]# rhn-migrate-classic-to-rhsm --no-auto Red Hat account: qa Password: System Engine Username: admin Password: Org: SAM QE Environment: QE 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 ... System successfully unregistered from RHN Classic. Attempting to register system to Red Hat Subscription Management ... The system has been registered with id: 4414d88c-2aa3-403b-992a-be09fb94afa6 System 'rhsm-accept-rhel6.usersys.redhat.com' successfully registered to Red Hat Subscription Management. [root@rhsm-accept-rhel6 ~]# VERIFIED: Total Success! 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 |