Bug 966745 - rhn-migrate-classic-to-rhsm tool fails with "coercing to Unicode: need string or buffer, NoneType found"
Summary: rhn-migrate-classic-to-rhsm tool fails with "coercing to Unicode: need string...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510
TreeView+ depends on / blocked
 
Reported: 2013-05-23 20:22 UTC by John Sefler
Modified: 2013-09-30 23:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 23:10:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description John Sefler 2013-05-23 20:22:57 UTC
Description of problem:

This appears to be a regression in the happy path behavior of rhn-migrate-classic-to-rhsm.  After a normal rhnreg_ks registration, a simple migration fails as follows....

[root@rhsm-compat-rhel59 ~]# rhn-migrate-classic-to-rhsm -n
Red Hat account: qa
Password:
System Engine Username: testuser1
Password:
Org: admin
 
Retrieving existing RHN Classic subscription information...
 
+-----------------------------------------------------+
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-5
 
+-----------------------------------------------------+
Installing product certificates for these RHN Classic channels:
+-----------------------------------------------------+
rhel-x86_64-server-5
 
Product certificates installed successfully to /tmp/migratedProductCertDir.
coercing to Unicode: need string or buffer, NoneType found
[root@rhsm-compat-rhel59 ~]# echo $?
255


Did NOT expect "coercing to Unicode: need string or buffer, NoneType found"


Here's the stacktrace found in rhsm.log...
2013-05-23 07:10:36,443 [ERROR]  @managercli.py:150 - Exception caught in rhm-migrate-classic-to-rhsm
2013-05-23 07:10:36,443 [ERROR]  @managercli.py:151 - coercing to Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 74, in ?
    sys.exit(abs(main() or 0))
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 65, in main
    return migrate.MigrationEngine().main()
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 677, in main
    self.write_migration_facts()
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 485, in write_migration_facts
    json.dump({"migration.classic_system_id": self.get_system_id(),
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 476, in get_system_id
    p = libxml2.parseDoc(file(system_id_path).read())
TypeError: coercing to Unicode: need string or buffer, NoneType found


Version-Release number of selected component (if applicable):
[root@rhsm-compat-rhel59 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.8.8-1.git.8.7625592.el5
python-rhsm-1.8.11-1.git.1.7236cc2.el5

Comment 2 Alex Wood 2013-05-29 15:30:58 UTC
commit 550db67cea32179be7da375e3e6a26ffd97c3377
Author: Alex Wood <awood>
Date:   Thu May 23 16:50:55 2013 -0400

    966745: Correct typo in name of configuration value.

Comment 5 Sharath Dwaral 2013-06-05 20:26:33 UTC
State of Subscription-Manager after migration 

# subscription-manager identity
Current identity is: fed049b6-09ea-41fd-baf1-e66606ffb39a
name: dhcp129-119.rdu.redhat.com
org name: Admin Owner
org ID: admin

Comment 6 Sharath Dwaral 2013-06-05 20:26:49 UTC
State of Subscription-Manager after migration 

# subscription-manager identity
Current identity is: fed049b6-09ea-41fd-baf1-e66606ffb39a
name: dhcp129-119.rdu.redhat.com
org name: Admin Owner
org ID: admin

Comment 8 errata-xmlrpc 2013-09-30 23:10:02 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.

http://rhn.redhat.com/errata/RHBA-2013-1332.html


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