RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 810399 - Firstboot crashes when already registered to rhsm
Summary: Firstboot crashes when already registered to rhsm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2012-04-05 21:01 UTC by J.C. Molet
Modified: 2012-06-20 13:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:09:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 810363 0 unspecified CLOSED Firstboot crashes when [re]registering using a bad proxy 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Internal Links: 810363

Description J.C. Molet 2012-04-05 21:01:13 UTC
Description of problem:
If you had registered subscription-manager before starting firstboot (via cli or in a kickstart) firstboot will throw an exception and crash.

Version-Release number of selected component (if applicable):
subscription-manager-gnome-1.0.0-1.git.2.711e916.el6.x86_64
subscription-manager-firstboot-1.0.0-1.git.2.711e916.el6.x86_64
python-rhsm-1.0.0-1.git.1.873e09b.el6.noarch
subscription-manager-migration-data-1.12.1.2-1.git.0.9e244c8.el6.noarch
subscription-manager-migration-1.0.0-1.git.2.711e916.el6.x86_64
subscription-manager-1.0.0-1.git.2.711e916.el6.x86_64

How reproducible:
always


Steps to Reproduce:
1.  register subscription manager via cli:  subscription-manager register --username=testuser1 --password=password --org=admin 
    or via the appropriate commands in a kickstart postinstall
2.  start firstboot
3.  continue along and select to register with the new rhsm
  
Actual results:
executable:     /usr/bin/python
hashmarkername: firstboot
kernel:         2.6.32-220.4.1.el6.x86_64
reason:         IndexError: list index out of range
time:           Thu 05 Apr 2012 04:33:17 PM EDT

firstboot-tb-TNvyVa: Text file, 42636 bytes

description:
:The following was filed automatically by firstboot:
:firstboot 1.110.11 exception report
:Traceback (most recent call last):
:  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 105, in _nextClicked
:    self.advance()
:  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 148, in advance
:    result = module.apply(self, self.testing)
:  File "/usr/share/rhn/up2date_client/firstboot/rhn_choose_server_gui.py", line 57, in apply
:    while not interface.moduleList[i].__module__.startswith('rhsm_'):
:IndexError: list index out of range

END:


Expected results:
I would expect this to behave exactly like rhn-classic currently does.  If it detects that you are already registered it doesn't even ask you if you would like to register and just skips to the final entitlement screen.

Additional info:

Comment 1 Adrian Likins 2012-04-09 17:40:43 UTC
The crash is in a rhn module, rhn_choose_server_gui. It is attempting to figure out where the screen after rhsm is, but to do that, it checks to see if rhsm_logging module exists. But the way it checks (looking for rhsm_module python module loaded into python's module path) is a bit of a false positive, since that can be there, even if the module itself isn't in firstboot's module list (which, in this case, it isn't because rhsm_login.shouldAppear is false, because the system is already loaded).

Basically, it's trying to look for the module loaded after rhsm_*, but there are no rhsm_* modules loaded. And I don't really see a good way for rhn_choose_server_gui to detect if the rhsm modules are loaded (at least not
at the time of createScreen which it needs to toggle the "rhn classic" widget).

Comment 2 Adrian Likins 2012-04-09 18:16:05 UTC
what versions of rhn-setup-gnome?

Comment 3 Adrian Likins 2012-04-09 18:24:29 UTC
I was able to reproduce this on a 6.2.x box with an older rhn-setup-gnome, but with a 6.3.x box, it seems to be okay for me.

Comment 4 J.C. Molet 2012-04-10 16:09:24 UTC
Testing this on a freshly built 6.3 box using rhn-setup-gnome-1.0.0-82.el6.noarch

I can see using strace that firstboot now tries to do:

stat("/etc/pki/product", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/pki/entitlement", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/pki/consumer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0

before it gets to that screen and now skips the entitlement part entirely.


Now the question is this:  shouldn't the latest package of subscription-manager-firstboot now require rhn-setup-gnome with versions >= 1.0.0-82 so people upgrading from rhel 6.2 systems get the right dependency?

Comment 5 Adrian Likins 2012-04-10 17:23:40 UTC
commit d10e51f10d468eabd2e2274a5580d8907f7ed76b
Author: Adrian Likins <alikins>
Date:   Tue Apr 10 12:19:52 2012 -0400

    810399: require the latest rhn-setup-gnome for firstboot
    
    Older versions of rhn-setup-gnome will crash firstboot
    when used with newer subscription-manager-firstboot

Comment 8 J.C. Molet 2012-04-11 15:22:53 UTC
[root@jmolet-vm0 ~]# rpm -qa | grep subscription-manager
subscription-manager-migration-data-1.12.1.2-1.git.2.99d0c10.el6.noarch
subscription-manager-gnome-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-migration-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-firstboot-1.0.0-1.git.11.f42a186.el6.x86_64


[root@jmolet-vm0 ~]# rpm -qR subscription-manager-firstboot
librsvg2  
rhn-setup-gnome >= 1.0.0-82
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
subscription-manager-gnome = 1.0.0-1.git.11.f42a186.el6
rpmlib(PayloadIsXz) <= 5.2-1


subscription-manager-firstboot now requires rhn-setup-gnome >= 1.0.0-82

marking VERIFIED.

Comment 10 errata-xmlrpc 2012-06-20 13:09: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-2012-0804.html


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