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 1423443 - "tuple index out of range" when tried to list the compliance status
Summary: "tuple index out of range" when tried to list the compliance status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.9
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-17 10:52 UTC by Rehana
Modified: 2021-09-09 12:08 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-19 05:21:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1556 0 None closed 1423443: Handle IndexError during m2crypto request 2021-01-08 10:10:25 UTC
Red Hat Product Errata RHBA-2018:1916 0 None None None 2018-06-19 05:22:42 UTC

Description Rehana 2017-02-17 10:52:47 UTC
Description of problem:
I have upgraded the subscription-manager packages from 1.18 to 1.19 in order to test the golden ticket functionality. after updating its observed that the "golden ticket" entitlement was attached immediately. but on trying to know the compliance status using ` subscription-manager status` i got the error "tuple index out of range"

Version-Release number of selected component (if applicable):
subscription management server: 2.0.25-1
subscription management rules: 5.20
subscription-manager: 1.19.1-1.git.9.908316a.el6
python-rhsm: 1.19.1-1.git.3.9985682.el6

How reproducible:


Steps to Reproduce:
1.register client with org =snowwhite in test data
2.list the "golden ticket" entitlement in /etc/pki/entitlement dir
3. Verify the compliance status by `subscription-manager status`

Actual results:
[root@dhcp35-181 home]# subscription-manager status
tuple index out of range


Expected results:
should list the compliance status on the machine.

rhsm.log
---------
2017-02-17 05:45:46,208 [DEBUG] subscription-manager:10981:MainThread @connection.py:455 - Using proxy: auto-services.usersys.redhat.com:3129
2017-02-17 05:45:46,208 [DEBUG] subscription-manager:10981:MainThread @connection.py:469 - Making request: GET /candlepin/consumers/a6db9195-e133-4734-8ca8-14f71dd74b69/compliance
2017-02-17 05:45:57,500 [ERROR] subscription-manager:10981:MainThread @managercli.py:178 - exception caught in subscription-manager
2017-02-17 05:45:57,500 [ERROR] subscription-manager:10981:MainThread @managercli.py:179 - tuple index out of range
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 89, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 80, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 2783, in main
    return CLI.main(self)
  File "/usr/lib/python2.6/site-packages/subscription_manager/cli.py", line 160, in main
    return cmd.main()
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 539, in main
    return_code = self._do_command()
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 2740, in _do_command
    self.sorter = inj.require(inj.CERT_SORTER)
  File "/usr/lib/python2.6/site-packages/subscription_manager/injection.py", line 104, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/subscription_manager/injection.py", line 78, in require
    self.providers[feature] = provider()
  File "/usr/lib/python2.6/site-packages/subscription_manager/cert_sorter.py", line 325, in __init__
    super(CertSorter, self).__init__()
  File "/usr/lib/python2.6/site-packages/subscription_manager/cert_sorter.py", line 65, in __init__
    self.load()
  File "/usr/lib/python2.6/site-packages/subscription_manager/cert_sorter.py", line 111, in load
    self._parse_server_status()
  File "/usr/lib/python2.6/site-packages/subscription_manager/cert_sorter.py", line 130, in _parse_server_status
    status = self.get_compliance_status()
  File "/usr/lib/python2.6/site-packages/subscription_manager/cert_sorter.py", line 343, in get_compliance_status
    return status_cache.load_status(self.cp_provider.get_consumer_auth_cp(), self.identity.uuid)
  File "/usr/lib/python2.6/site-packages/subscription_manager/cache.py", line 200, in load_status
    self._sync_with_server(uep, uuid)
  File "/usr/lib/python2.6/site-packages/subscription_manager/cache.py", line 309, in _sync_with_server
    self.server_status = uep.getCompliance(uuid)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 1009, in getCompliance
    return self.conn.request_get(method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 599, in request_get
    return self._request("GET", method, headers=headers)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 625, in _request
    info=info, headers=headers)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 481, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python2.6/site-packages/rhsm/m2cryptohttp.py", line 179, in request
    return self._connection.request(method, handler, *args, **kwargs)
  File "/usr/lib64/python2.6/httplib.py", line 976, in request
    if v.args[0] != 32 or not self.auto_open:
IndexError: tuple index out of range
2017-02-17 05:46:07,944 [DEBUG] rhsmcertd-worker:10982:MainThread @base_action_client.py:82 - running lib: <subscription_manager.entcertlib.EntCertActionInvoker object at 0x290b0d0>
2017-02-17 05:46:07,945 [INFO] rhsmcertd-worker:10982:MainThread @connection.py:755 - Connection built: http_proxy=auto-services.usersys.redhat.com:3129 host=F21-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2017-02-17 05:46:07,945 [DEBUG] rhsmcertd-worker:10982:MainThread @identity.py:132 - Loading consumer info from identity certificates.
2017-02-17 05:46:07,953 [DEBUG] rhsmcertd-worker:10982:MainThread @connection.py:425 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, redhat-entitlement-authority.pem, F21-candlepin.pem, candlepin-ca.pem


Additional info:

Comment 1 Rehana 2017-02-17 11:03:50 UTC
Additional note: The issue is not always reproducible.

Comment 3 J.C. Molet 2017-02-20 15:35:07 UTC
Here are the logs for the proxy, I'm not adding all the logs because they're all identical to this, but here are the actual connection attempts for this bug:


CONNECT   Feb 17 05:45:31 [553]: Connect (file descriptor 6): dhcp35-181.lab.eng.blr.redhat.com [10.70.35.181]
CONNECT   Feb 17 05:45:31 [553]: Request (file descriptor 6): CONNECT F21-candlepin.usersys.redhat.com:8443 HTTP/1.1
INFO      Feb 17 05:45:31 [553]: No upstream proxy for F21-candlepin.usersys.redhat.com
CONNECT   Feb 17 05:45:31 [553]: Established connection to host "F21-candlepin.usersys.redhat.com" using file descriptor 7.
INFO      Feb 17 05:45:31 [553]: Not sending client headers to remote machine
INFO      Feb 17 05:45:41 [553]: Closed connection between local client (fd:6) and remote client (fd:7)
CONNECT   Feb 17 05:45:52 [552]: Connect (file descriptor 6): dhcp35-181.lab.eng.blr.redhat.com [10.70.35.181]
CONNECT   Feb 17 05:45:52 [552]: Request (file descriptor 6): CONNECT F21-candlepin.usersys.redhat.com:8443 HTTP/1.1
INFO      Feb 17 05:45:52 [552]: No upstream proxy for F21-candlepin.usersys.redhat.com
CONNECT   Feb 17 05:45:52 [552]: Established connection to host "F21-candlepin.usersys.redhat.com" using file descriptor 7.
INFO      Feb 17 05:45:52 [552]: Not sending client headers to remote machine

Comment 7 Rehana 2018-04-11 11:55:26 UTC
on RHEL69 , with the following version of subscription-manager golden ticket was not issued:


[root@dhcp35-64 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.2-1
subscription management rules: 5.26
subscription-manager: 1.18.10-1.el6
python-rhsm: 1.18.6-1.el6

[root@dhcp35-64 ~]# subscription-manager register --username=admin --password=admin --org=snowwhite
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 6fc70c8b-3768-40df-8a95-d4a3fab6a417
 
[root@dhcp35-64 ~]# subscription-manager list --consumed
No consumed subscription pools to list

[root@dhcp35-64 ~]# ll /etc/pki/entitlement/
total 0

Now upgrade the subscription-manager to RHEL6.10 version to check the golden ticket 

<not shown>

[root@dhcp35-64 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.2-1
subscription management rules: 5.26
subscription-manager: 1.20.10-3.el6

[root@dhcp35-64 ~]# subscription-manager register --username=admin --password=admin --org=snowwhite
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: b44c0bc7-7a2b-4963-9ddf-053bf30b0b0b
The registered system name is: dhcp35-64.lab.eng.blr.redhat.com

[root@dhcp35-64 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[root@dhcp35-64 ~]# ll /etc/pki/entitlement/
total 8
-rw-------. 1 root root 1675 Apr 11 07:29 7783064522407663821-key.pem
-rw-r--r--. 1 root root 3208 Apr 11 07:29 7783064522407663821.pem

[root@dhcp35-64 ~]# subscription-manager list --consumed
No consumed subscription pools were found.

[root@dhcp35-64 ~]# subscription-manager list --installed
No installed products to list

Observed that golden ticket subscriptions were downloaded , and the `subscription-manager status` command displayed the system status as "current" when no products were installed 

[root@dhcp35-64 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Enterprise Linux Server:
- Not supported by a valid subscription.

[root@dhcp35-64 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.10 Beta
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:         

 also the `subscription-manager status` command displayed the system status as "Invalid" when products were installed

Comment 9 Rehana 2018-04-23 10:57:29 UTC
Moving back to Verified!! as per the comment 7

Comment 12 errata-xmlrpc 2018-06-19 05:21:43 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.

https://access.redhat.com/errata/RHBA-2018:1916


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