Bug 719116

Summary: certmgr.py:98 - unsupported operand type(s) for +=: 'int' and 'NoneType'
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 17:22:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 682238    

Description John Sefler 2011-07-05 19:53:23 UTC
Description of problem:
The following traceback is in the rhsm.log after registering and restarting rhsmcertd...


Version-Release number of selected component (if applicable):
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.2-1.git.19.47243e5.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-onprem-62server ~]# subscription-manager register --username=testuser1 --password=password --org=admin
The system has been registered with id: 6eaebe7b-7b7e-4d84-9991-6c945f9b09f4 
[root@jsefler-onprem-62server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 240   


[root@jsefler-onprem-62server ~]# tail -f /var/log/rhsm/rhsm.log
2011-07-05 15:49:06,585 [INFO]  @connection.py:322 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-07-05 15:49:06,585 [INFO]  @connection.py:332 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-07-05 15:49:06,587 [INFO]  @repolib.py:104 - repos updated: 0
2011-07-05 15:49:06,587 [ERROR]  @certmgr.py:96 - Error while updating certificates using daemon
2011-07-05 15:49:06,588 [ERROR]  @certmgr.py:98 - unsupported operand type(s) for +=: 'int' and 'NoneType'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 90, in <module>
    main()
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 79, in main
    updates = mgr.update()
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 60, in update
    updates += lib.update()
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'




Additional info:

Comment 2 Bryan Kearney 2011-07-12 12:04:18 UTC
Can not reproduce this. The code is no longer there, so I think anothr refactoring has caused this to work now.

Comment 3 John Sefler 2011-07-12 19:32:39 UTC
I can no longer produce the failure in comment 0...

Verifying version....
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.3-1.git.33.8f93d7f.el6.x86_64

[root@jsefler-onprem-62server ~]# subscription-manager register --username=testuser1 --password=password --org=admin
The system has been registered with id: a38d9593-099c-45a1-a963-11db1cdf1305 
[root@jsefler-onprem-62server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 240                                     [  OK  ]
[root@jsefler-onprem-62server ~]# 




[root@jsefler-onprem-62server ~]# tail -f /var/log/rhsm/rhsm.log
2011-07-12 15:27:52,345 [INFO]  @connection.py:335 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-07-12 15:27:52,347 [DEBUG]  @connection.py:175 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-07-12 15:27:52,348 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/fakamai-cp1.pem'
2011-07-12 15:27:52,349 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-07-12 15:27:52,350 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-07-12 15:27:52,350 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-07-12 15:27:52,352 [DEBUG]  @connection.py:196 - Making request: GET /candlepin/
2011-07-12 15:27:52,451 [DEBUG]  @connection.py:203 - Response status: 200
2011-07-12 15:27:52,464 [DEBUG]  @connection.py:364 - Server supports the following resources:
2011-07-12 15:27:52,467 [DEBUG]  @connection.py:365 - {'serials': '/serials', 'status': '/status', 'owners': '/owners', 'activate': '/activate', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'admin': '/admin', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'content': '/content', 'pools': '/pools', 'products': '/products', 'activation_keys': '/activation_keys', 'atom': '/atom', 'entitlements': '/entitlements', 'events': '/events', 'crl': '/crl', 'rules': '/rules'}
2011-07-12 15:27:52,468 [INFO]  @connection.py:347 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-07-12 15:27:52,470 [INFO]  @repolib.py:108 - repos updated: 0
2011-07-12 15:27:52,659 [DEBUG]  @certlib.py:675 - Sorting product and entitlement cert status for: 2011-07-12 15:27:52.658675
2011-07-12 15:27:52,716 [DEBUG]  @certlib.py:693 - Installed product IDs: ['100000000000060', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2011-07-12 15:27:52,717 [DEBUG]  @certlib.py:684 - valid entitled products: []
2011-07-12 15:27:52,718 [DEBUG]  @certlib.py:685 - expired entitled products: []
2011-07-12 15:27:52,720 [INFO]  @factlib.py:52 - Facts have not changed, skipping upload.
2011-07-12 15:27:52,727 [INFO]  @pkgprofile.py:114 - Server does not support packages, skipping profile upload.
2011-07-12 15:27:52,737 [DEBUG]  @connection.py:175 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-07-12 15:27:52,737 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/fakamai-cp1.pem'
2011-07-12 15:27:52,738 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-07-12 15:27:52,738 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-07-12 15:27:52,739 [DEBUG]  @connection.py:160 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-07-12 15:27:52,750 [DEBUG]  @connection.py:196 - Making request: GET /candlepin/consumers/a38d9593-099c-45a1-a963-11db1cdf1305/certificates/serials
2011-07-12 15:27:52,886 [DEBUG]  @connection.py:203 - Response status: 200
2011-07-12 15:27:52,887 [INFO]  @certlib.py:128 - certs updated:
Total updates: 0
Found (local) serial# []
Expected (UEP) serial# []
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
Expired (not deleted):
  <NONE>
Expired (deleted):
  <NONE>

Comment 4 errata-xmlrpc 2011-12-06 17:22:00 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-2011-1695.html