Bug 1497028 - Entitlement certificate upload fails with "TypeError: 'NoneType' object is not iterable" error.
Summary: Entitlement certificate upload fails with "TypeError: 'NoneType' object is no...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 3.0.4
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: 3.0.7
: 3.0.x
Assignee: RHUI Bug List
QA Contact: Vratislav Hutsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-29 03:11 UTC by Tapomoy Bhowmik
Modified: 2020-12-14 10:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 18:05:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0149 0 None None None 2019-01-23 18:05:17 UTC

Description Tapomoy Bhowmik 2017-09-29 03:11:20 UTC
Description of problem: Unable to upload a new entitlement certificate. It fails with "TypeError: 'NoneType' object is not iterable" error.

===================================
# rhui-manager cert upload --cert /root/8a85f9815d3ed0d5015d3f44defc738b.pem
 
Full log from /root/.rhui/rhui.log:
 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/cli.py", line 81, in run
    Cli.run(self, args)
  File "/usr/lib/python2.6/site-packages/rhui/common/cli.py", line 272, in run
    command_or_section.execute(remaining_args)
  File "/usr/lib/python2.6/site-packages/rhui/common/cli.py", line 113, in execute
    self.method(**arg_dict)
  File "/usr/lib/python2.6/site-packages/rhui/tools/commands/cert.py", line 63, in upload
    self._upload_cert(valid_cert_filename)
  File "/usr/lib/python2.6/site-packages/rhui/tools/commands/cert.py", line 152, in _upload_cert
    self.cert_manager.add_certificate(valid_cert_filename)
  File "/usr/lib/python2.6/site-packages/rhui/tools/cert_manager.py", line 273, in add_certificate
    entitlements = cert_utils.entitlements_in_cert(cert_filename)
  File "/usr/lib/python2.6/site-packages/rhui/common/cert_utils.py", line 129, in entitlements_in_cert
    return entitlements_in_cert_v3(cert)
  File "/usr/lib/python2.6/site-packages/rhui/common/cert_utils.py", line 177, in entitlements_in_cert_v3
    for c in cert.content:
TypeError: 'NoneType' object is not iterable
==============


Version-Release number of selected component (if applicable): rh-rhui-tools-2.1.37-2.el6.noarch   rh-rhui-tools-debug-script-2.1.37-2.el6.noarch


How reproducible: Reproducible at customer's end.


Steps to Reproduce:
1. Unsubscribe and unregister the existing RHUA server.
2. Register and subscribe the RHUA server.
3. Now try to upload the new entitlement certificate using the below command.
   # rhui-manager cert upload --cert /root/8a85f9815d3ed0d5015d3f44defc738b.pem


Actual results: Entitlement certificate upload fails with "TypeError: 'NoneType' object is not iterable" error.


Expected results: Entitlement certificate should be uploaded successfully without any error and we should be able to list all the entitlements.


Additional info:

Comment 10 errata-xmlrpc 2019-01-23 18:05:13 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-2019:0149


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