Bug 700952

Summary: traceback in rhsm.log occurs when rhsmcertd triggers and no consumer is registered
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: dgoodwin, spandey
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-07-21 08:46:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 675214    

Description John Sefler 2011-04-29 21:55:18 UTC
Description of problem:

Version-Release number of selected component (if applicable):
[root@jsefler-onprem-5server product]# rpm -qa | grep subscription-manager
subscription-manager-firstboot-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-gnome-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-0.95.5.8-1.git.6.42d8706.el5
[root@jsefler-onprem-5server product]# rpm -qa | grep python-rhsm
python-rhsm-0.95.5.3-1.git.2.01e0da5.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-onprem-5server ~]# subscription-manager unregister
This system is currently not registered.

[root@jsefler-onprem-5server ~]# sed -i s/^certFrequency.*/certFrequency=1/g /etc/rhsm/rhsm.conf; grep certFrequency /etc/rhsm/rhsm.conf
certFrequency=1

[root@jsefler-onprem-5server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 1                                       [  OK  ]

[root@jsefler-onprem-5server ~]# tail -f /var/log/rhsm/rhsm.log

<wait a minute and watch the log>
  
Actual results:
2011-04-29 17:36:09,960 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.
2011-04-29 17:36:09,960 [ERROR]  @certmgr.py:92 - Error while updating certificates using daemon
2011-04-29 17:36:09,960 [ERROR]  @certmgr.py:94 - -1
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 90, in ?
    main()
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 74, in main
    sys.exit(-1)
SystemExit: -1


Expected results:
2011-04-29 17:36:09,960 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.

Additional info:
In comparison with rhel6, only the message "Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed." is logged to rhsm.log.  Currently in rhel5, the extra error on certmgr.py:92 is logged and the traceback is thrown from certmgr.py:94

This was detected by automated test: rhsmcertdChangeCertFrequency_Test

Comment 1 Devan Goodwin 2011-05-06 17:35:03 UTC
sys.exit(1) triggers a SystemExit on older Python versions, does not appear to be treated as such in the newer ones.

Fixed in subscription-manager.git:

master: 0dcc761488f70b16abba1b32dedf6e86566117d5
RHEL5.7: 51065a7cfddb51dbe52bc5965535432caea01a44

Comment 2 spandey 2011-05-18 10:53:13 UTC
verified using following setup :

subscription-manager-firstboot-0.95.5.18-1.git.0.490e92f.el5
subscription-manager-0.95.5.18-1.git.0.490e92f.el5
subscription-manager-gnome-0.95.5.18-1.git.0.490e92f.el5

no traceback found in rhsm.log 

snip rhsn.log 

2011-05-18 16:17:13,984 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.
2011-05-18 16:18:14,100 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.
2011-05-18 16:19:14,219 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.
2011-05-18 16:20:14,339 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.
2011-05-18 16:21:14,460 [ERROR]  @certmgr.py:72 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.


verified moving defect status from Modified to verified

Comment 3 errata-xmlrpc 2011-07-21 08:46:11 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-1078.html

Comment 4 errata-xmlrpc 2011-07-21 12:30:19 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-1078.html