Bug 1431334 - Migrating Satellite 5 installations from RHN to RHSM fails if the user has a username which is an email address.
Summary: Migrating Satellite 5 installations from RHN to RHSM fails if the user has a ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Registration
Version: RHN Stable
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Richard Bernleithner
QA Contact:
URL:
Whiteboard:
Depends On: 1459619
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-11 11:22 UTC by Rich Jerrido
Modified: 2021-06-10 12:02 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-13 18:33:22 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3066591 0 None None None 2017-06-02 14:18:58 UTC

Description Rich Jerrido 2017-03-11 11:22:48 UTC
Description of problem:


When following the processes as described in (https://access.redhat.com/articles/2884191) to migrate a Satellite 5 installation from RHN to RHSM, the user is unable to activate their Satellite if their RHN username is an email address (such as joe). 

Version-Release number of selected component (if applicable):
spacewalk-backend-2.3.3-46.el6sat.noarch

How reproducible:
100%


Steps to Reproduce:

On your Satellite 5 installation that is registered to RHN install subscription-manager{,-migration}

# yum install subscription-manager subscription-manager-migration


 
# rhn-migrate-classic-to-rhsm
Legacy username:  joe
Legacy password:  <YOUR_RHN_PASSWORD>

# rhn-satellite-activate -vvv --rhn-cert=/path/to/cert.xml

Actual results:

Traceback similar to the following

RHN_PARENT: satellite.rhn.redhat.com
HTTP_PROXY: None
HTTP_PROXY_USERNAME: None
HTTP_PROXY_PASSWORD: <password>
CA_CERT: /usr/share/rhn/RHNS-CA-CERT
Checking cert XML sanity and GPG signature: '/usr/bin/validate-sat-cert.pl --keyring /etc/webapp-keyring.gpg /etc/sysconfig/rhn/rhn-entitlement-cert.xml-TyPUGN'
Database connectioned initialized: refer to /etc/rhn/rhn.conf
Attempting local RHN Certificate push (and therefore activation)
Executing: remote XMLRPC activation call.
Error reported from RHN: <Fault -2: 'unhandled internal exception: \nError Message:\n    Invalid username provided when registering system\nError Class Code: 2\nError Class Info: \n     Invalid username and password combination.\n\n     If you are using email address as a login, try using your associated\n     login name instead.\nExplanation: \n     An error has occurred while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n     details of what you were trying to do when this error occurred and\n     details on how to reproduce this problem.\n'>
ERROR: unhandled XMLRPC fault upon remote activation: <Fault -2: 'unhandled internal exception: \nError Message:\n    Invalid username provided when registering system\nError Class Code: 2\nError Class Info: \n     Invalid username and password combination.\n\n     If you are using email address as a login, try using your associated\n     login name instead.\nExplanation: \n     An error has occurred while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n     details of what you were trying to do when this error occurred and\n     details on how to reproduce this problem.\n'>

ERROR: <Fault -2: 'unhandled internal exception: \nError Message:\n    Invalid username provided when registering system\nError Class Code: 2\nError Class Info: \n     Invalid username and password combination.\n\n     If you are using email address as a login, try using your associated\n     login name instead.\nExplanation: \n     An error has occurred while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n     details of what you were trying to do when this error occurred and\n     details on how to reproduce this problem.\n'>


Expected results:

Successful activation

Additional info:


If user uses (or creates) an account whose username is NOT an email address, activation works without issue.

Comment 1 Jan Dobes 2017-03-13 09:40:10 UTC
Relevant error message:
"Invalid username and password combination. If you are using email address as a login, try using your associated login name instead."

It seems as limitation of the new activation API on RHN side.

Comment 3 Tomas Lestach 2017-03-13 11:25:27 UTC
The exception is coming from RHN. I'm not aware of anything, what could be done on the Satellite 5 side.

Looking into RHN git (not sure, whether checking the correct branch), I think the relevant code is:
 * backend/src/server/handlers/redhat_xmlrpc/registration.py
 * backend/src/server/rhnUser.py

Flipping the BZ over to RHN and adding Jake to CC.

Comment 4 Grant Gainey 2017-03-13 12:39:22 UTC
The RHSM-to-RHN path is new - it's almost certainly the cause, not the existing registration.py path

Comment 8 Kenny Tordeurs 2017-06-02 14:16:20 UTC
I confirm this issue can be resolved by creating a new user that is not an email address as login.


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