Bug 729988 - 'NoneType' object has no attribute 'lower' when subscription-manager register run in kickstart
Summary: 'NoneType' object has no attribute 'lower' when subscription-manager register...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
Depends On:
Blocks: 738066 691780 756082
TreeView+ depends on / blocked
Reported: 2011-08-11 13:31 UTC by Pavel Holica
Modified: 2012-06-20 12:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-06-20 12:56:31 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Description Pavel Holica 2011-08-11 13:31:12 UTC
Description of problem:
Running subscription-manager register in kickstart in post section (in chrooted environment) shows error and gives 0 as exit code.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. create kickstart with post section looking like this:
echo "subscription-manager output:" > /root/subscription-manager.txt
subscription-manager register --username SOMEUSERNAME --password SOMEPASSWORD >> /root/subscription-manager.txt 2>&1
echo "subscription-manager return code: $?" >> /root/subscription-manager.txt
2. use such kickstart
3. cat /root/subscription-manager.txt
Actual results:
subscription-manager output:
'NoneType' object has no attribute 'lower'
subscription-manager return code: 0

Expected results:
subscription-manager output:
some-identifier machine_hostname
subscription-manager return code: 0

Additional info:

Comment 1 Alexander Bersenev 2011-09-20 19:24:03 UTC
I have a same problem. I workarounded it with an export LANG="en_US.UTF-8" command.

The bug is easy reproductable:
[root@tesla16 ~]# subscription-manager register
This system is already registered. Use --force to override
[root@tesla16 ~]# LANG=C subscription-manager register
'NoneType' object has no attribute 'lower'

LANG=C was used during install and subscription-manager doesn't work with it.

Comment 4 John Sefler 2012-01-05 18:25:47 UTC
This may already have been fixed by related bug 700601 bug 702403 bug 702078

Comment 5 Bryan Kearney 2012-02-22 15:37:09 UTC
This has been fixed as John Sefler has stated in comment 4.

Comment 7 John Sefler 2012-03-14 17:13:30 UTC
Reproducing failure on broken version (from rhel61)...
[root@rhsm-compat-rhel61 ~]# rpm -q subscription-manager
[root@rhsm-compat-rhel61 ~]# LANG=C subscription-manager register
'NoneType' object has no attribute 'lower'
[root@rhsm-compat-rhel61 ~]# echo $?
[root@rhsm-compat-rhel61 ~]# 

Verifying fix on latest version (targeting rhel63)...
[root@jsefler-r63-workstation ~]# rpm -q subscription-manager
[root@jsefler-r63-workstation ~]# LANG=C subscription-manager register
Username: qa@redhat.com
The system has been registered with id: f57f013a-f092-43f6-b9f2-820eb43b8a8c 
[root@jsefler-r63-workstation ~]# echo $?
[root@jsefler-r63-workstation ~]# 

moving to VERIFIED

Comment 8 John Sefler 2012-03-14 17:56:35 UTC
Note: If registering from from within the kickstart, you could specify the username and password [and org] as demonstrated in comment 0

[root@jsefler-r63-workstation ~]# LANG=C subscription-manager register --username SOMEUSERNAME --password SOMEPASSWORD 1>/tmp/stdout 2>/tmp/stderr
[root@jsefler-r63-workstation ~]# echo $?
[root@jsefler-r63-workstation ~]# cat /tmp/stdout
The system has been registered with id: b9a10105-977a-4d50-b37d-2ed05fbad50f 
[root@jsefler-r63-workstation ~]# cat /tmp/stderr
[root@jsefler-r63-workstation ~]# 

^^ This demonstrates that registration with username and password supplied as parameters explicitly using the default fallback C local now works.

Comment 10 errata-xmlrpc 2012-06-20 12:56:31 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.


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