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 1432947 - GUI: AttributeError: 'NoneType' object has no attribute 'id' when tried to list all available subscription from gui against a golden ticket enabled org
Summary: GUI: AttributeError: 'NoneType' object has no attribute 'id' when tried to li...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-16 12:56 UTC by Rehana
Modified: 2017-08-01 19:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:21:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error (178.25 KB, image/png)
2017-03-16 12:56 UTC, Rehana
no flags Details
All_availableTab (842.32 KB, image/png)
2017-04-18 07:13 UTC, Rehana
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description Rehana 2017-03-16 12:56:23 UTC
Created attachment 1263683 [details]
error

Description of problem:
Observed error message AttributeError: 'NoneType' object has no attribute 'id' when tried to list all available subscription from subscription-manager-gui against a golden ticket enabled org

Version-Release number of selected component (if applicable):
subscription management server: 2.0.26-1
subscription management rules: 5.21
subscription-manager: 1.19.1-1.git.832.46d4712.el7
python-rhsm: 1.19.1-1.git.5753.46d4712.el7

How reproducible:
always against "snowwhite" org that have the "contentaccessmode" enabled

Steps to Reproduce:
1.Register client against "snowwhite"
2. launch subscription-manager-gui
3. move to "all available subscriptions" tab , hit "update"

Actual results:
Observed error (PFA: error.png)

Expected results:
Should list all the available subscriptions 

Additional info:
The issue is observed on both RHEL69 and RHEL74 machines having 1.19+ build
The issue is observed only against the org that had the contentaccessmode enabled, against "admin" org it works as normal 

rhsm.log
---------
2017-03-16 18:19:32,867 [INFO] subscription-manager-gui:8116:AsyncPoolRefreshThread @connection.py:509 - Response: status=200, requestUuid=dfbccfa1-4f34-405b-9c9b-fec04d41d592, request="GET /candlepin/owners/snowwhite/pools?consumer=845d0ea2-9803-428e-9b42-84e2b4d56978&listall=true"
2017-03-16 18:19:32,892 [ERROR] subscription-manager-gui:8116:MainThread @utils.py:69 - 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/async.py", line 43, in _run_refresh
    self.pool.refresh(active_on)
  File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 503, in refresh
    self.subscribed_pool_ids = self._get_subscribed_pool_ids()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 539, in _get_subscribed_pool_ids
    return [ent.pool.id for ent in require(ENT_DIR).list()]
AttributeError: 'NoneType' object has no attribute 'id'

Comment 1 Barnaby Court 2017-03-16 14:47:57 UTC
Rehana, do you see this issue on a sub-man earlier than 1.19?

Comment 2 Rehana 2017-03-17 06:03:20 UTC
(In reply to Barnaby Court from comment #1)
> Rehana, do you see this issue on a sub-man earlier than 1.19?

I retested the scenario on RHEL69 machine with the below mentioned version and yes i get the same behavior there as well(got the same error message)

Tested with the version :
subscription management server: 2.0.26-1
subscription management rules: 5.21
subscription-manager: 1.18.10-1.el6
python-rhsm: 1.18.6-1.el6

rhsm.log
==========

2017-03-17 01:58:59,275 [INFO] rhsmd:27718:MainThread @connection.py:758 - Connection built: host=F21-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2017-03-17 01:59:00,659 [INFO] rhsmd:27718:MainThread @connection.py:525 - Response: status=200, requestUuid=49dc33b8-98dd-4b7c-b79c-7735b4ecf6f4, request="GET /candlepin/consumers/ac59f9c1-76bb-42f1-896b-2a9e56b4b086/compliance"
2017-03-17 01:59:00,663 [INFO] rhsmd:27718:MainThread @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 and 32060 future_products= valid_until=None
2017-03-17 02:00:08,361 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @hwprobe.py:918 - collected virt facts: virt.is_guest=True, virt.host_type=kvm, virt.uuid=df8ef291-89c3-7f90-81fd-a916d3cc994f
2017-03-17 02:00:08,363 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @cache.py:398 - Server does not support packages, skipping profile upload.
2017-03-17 02:00:10,043 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @connection.py:525 - Response: status=200, requestUuid=76bd10b1-9fe7-44ae-9eed-11886270ebf7, request="GET /candlepin/consumers/ac59f9c1-76bb-42f1-896b-2a9e56b4b086/owner"
2017-03-17 02:00:13,865 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @connection.py:525 - Response: status=200, requestUuid=62392e1f-f15c-49f0-9260-e6b9db638cb5, request="GET /candlepin/owners/snowwhite/pools?consumer=ac59f9c1-76bb-42f1-896b-2a9e56b4b086"
2017-03-17 02:00:13,978 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @hwprobe.py:918 - collected virt facts: virt.is_guest=True, virt.host_type=kvm, virt.uuid=df8ef291-89c3-7f90-81fd-a916d3cc994f
2017-03-17 02:00:13,979 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @cache.py:398 - Server does not support packages, skipping profile upload.
2017-03-17 02:00:15,384 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @connection.py:525 - Response: status=200, requestUuid=258e6a87-0aca-4d5d-8855-a81d31cd6c4e, request="GET /candlepin/consumers/ac59f9c1-76bb-42f1-896b-2a9e56b4b086/owner"
2017-03-17 02:00:19,205 [INFO] subscription-manager-gui:27588:AsyncPoolRefreshThread @connection.py:525 - Response: status=200, requestUuid=49d7d811-4e13-4e97-b469-215c53b428af, request="GET /candlepin/owners/snowwhite/pools?consumer=ac59f9c1-76bb-42f1-896b-2a9e56b4b086&listall=true"
2017-03-17 02:00:19,270 [ERROR] subscription-manager-gui:27588:MainThread @utils.py:72 - 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager-gui", line 55, in <module>
    logging.captureWarnings(True)
AttributeError: 'module' object has no attribute 'captureWarnings'
c^C

Comment 4 Rehana 2017-04-18 07:13:35 UTC
Retested with ;

subscription management server: 2.1.0-1
subscription management rules: 5.23
subscription-manager: 1.19.8-1.el7
python-rhsm: 1.19.5-1.el7


No error message is observed on the subscription-manager GUI during listing all available subscriptions against a golden ticket enabled org, all the available subscriptions where listed on GUI.(PFA:All_availableTab.png) 

Marking as Verified!!

Comment 5 Rehana 2017-04-18 07:13:58 UTC
Created attachment 1272231 [details]
All_availableTab

Comment 6 errata-xmlrpc 2017-08-01 19:21:47 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-2017:2083


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