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 661345 - RHSM gets an index out of bounds exception if used against a single subscription
Summary: RHSM gets an index out of bounds exception if used against a single subscription
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Devan Goodwin
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: Entitlement-Beta
TreeView+ depends on / blocked
 
Reported: 2010-12-08 16:09 UTC by Bryan Kearney
Modified: 2011-05-19 13:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:38:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Selection of a single available subscription with 1 contract just before clicking "Subscribe" (76.12 KB, image/png)
2010-12-08 23:09 UTC, John Sefler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0611 0 normal SHIPPED_LIVE new package: subscription-manager 2011-05-18 17:56:21 UTC

Description Bryan Kearney 2010-12-08 16:09:26 UTC
Testing RHSM against the alpha data (rh-alpha-59). The data only has 1 subscription. I see the following exception:


(subscription-manager-gui:10585): libglade-WARNING **: unknown attribute `swapped' for <signal>.
Traceback (most recent call last):
  File "/home/bkearney/code/subscription-manager/src/gui/allsubs.py", line 232, in subscribe_button_clicked
    self._contract_selected(pools.pools[1])
IndexError: list index out of range

Comment 2 Devan Goodwin 2010-12-08 18:10:45 UTC
Cannot reproduce, probably because nothing is showing up as installed on my machine. If I select "provide software not yet installed" I see two subs. 

Could you email me the product cert(s) you have in /etc/pki/product?

Thanks.

Comment 3 Devan Goodwin 2010-12-08 18:37:28 UTC
To reproduce, you need to have only one subscription in the list on the All Subscriptions tab, and then hit the Subscribe button at the bottom.

There were actually about three errors here. First the pool index should be 0, not 1. After this the shortcut to just sub to the only sub available tried to destroy a GUI element that hadn't yet been initialized. Finally it looks like there was a missing return after the shortcut, as the entitlement would be given to the one pool, then we'd still show the contract selection, after which that would fail as you can't bind to the same pool twice. 

All three of these only surface in very specific situation, you must have only one row in your subscription list, and that row must contain only one contract, and you must not have previously opened a contract selector since starting the GUI.

All three fixed in: 571fd4d1ed71a80d62b78c1cff457a34308896b8

Comment 5 Bryan Kearney 2010-12-08 19:57:14 UTC
Verified on my machine.

Comment 6 John Sefler 2010-12-08 23:08:16 UTC
I reproduced the exception against hostname = candlepin1.devlab.phx1.redhat.com with user rh-alpha-99 and the subscription selected as shown in the attached screenshot.
Traceback (most recent call last):
  File "/usr/share/rhsm/gui/allsubs.py", line 232, in subscribe_button_clicked
    self._contract_selected(pools.pools[1])
IndexError: list index out of range

[root@jsefler-onprem02 ~]# rpm -qa | grep subscription-manager
subscription-manager-0.93.2-1.git.91.7f89664.fc14.x86_64
subscription-manager-gnome-0.93.2-1.git.91.7f89664.fc14.x86_64


NOW, I will update to a fixed subscription-manager...

[root@jsefler-onprem02 ~]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.93.3-1.git.0.a79d99d.fc14.x86_64
subscription-manager-0.93.3-1.git.0.a79d99d.fc14.x86_64

select the same (single subscription with 1 contract) as shown in the screenshot and click Subscribe

SUCCESS!  No traceback and a the subscription appears in "My Subscriptions"

Comment 7 John Sefler 2010-12-08 23:09:59 UTC
Created attachment 467611 [details]
Selection of a single available subscription with 1 contract just before clicking "Subscribe"

Comment 8 John Sefler 2010-12-08 23:11:07 UTC
moving to VERIFIED

Comment 9 errata-xmlrpc 2011-05-19 13:38:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html


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