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 708512 - rhsmcertd is logging "certificates updated" when it should be "update failed (255), retry in 1 minutes"
Summary: rhsmcertd is logging "certificates updated" when it should be "update failed ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: beta
: 6.3
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 756082 771481
TreeView+ depends on / blocked
 
Reported: 2011-05-27 20:43 UTC by John Sefler
Modified: 2014-02-13 08:10 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.0.10-1
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:53:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0350 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-02-20 20:53:35 UTC

Description John Sefler 2011-05-27 20:43:52 UTC
Description of problem:
rhsmcertd appends to the log /var/log/rhsm/rhsmcertd.log on its certFrequency in minutes
When not registered, the message to this log should be "update failed (255)".  Instead it is logging "certificates updated" as if it were registered. This is a regression from rhel61.



Version-Release number of selected component (if applicable):
[root@jsefler-onprem-5server ~]# rpm -q subscription-manager
subscription-manager-0.95.5.19-1.git.3.e01a44f.el5
[root@jsefler-onprem-5server ~]# rpm -q python-rhsm
python-rhsm-0.95.5.5-1.git.0.af97fb9.el5


How reproducible:


Steps to Reproduce:
1. edit /etc/rhsm/rhsm.conf and set certFrequency=1
2. subscription-manager clean
3. service rhsmcertd restart
4. tail -f /var/log/rhsm/rhsmcertd.log


Actual results:
[root@jsefler-onprem-5server ~]# subscription-manager clean
All local data removed
[root@jsefler-onprem-5server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 1                                       [  OK  ]
[root@jsefler-onprem-5server ~]# tail -f /var/log/rhsm/rhsmcertd.log
Fri May 27 16:39:24 2011: started: interval = 1 minutes
Fri May 27 16:39:24 2011: certificates updated
Fri May 27 16:40:24 2011: certificates updated
Fri May 27 16:41:24 2011: certificates updated


Expected results:
[root@jsefler-stage-6server ~]# subscription-manager clean
All local data removed
[root@jsefler-stage-6server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 1                                       [  OK  ]
[root@jsefler-stage-6server ~]# tail -f /var/log/rhsm/rhsmcertd.log
Fri May 27 16:40:43 2011: started: interval = 1 minutes
Fri May 27 16:40:43 2011: update failed (255), retry in 1 minutes
Fri May 27 16:41:43 2011: update failed (255), retry in 1 minutes
Fri May 27 16:42:44 2011: update failed (255), retry in 1 minutes

Comment 1 Chris Duryee 2011-05-31 17:40:22 UTC
I verified with James that the current behavior in the 5.7 version is expected. In the event that a user is not registered, the cert daemon will see that /etc/pki/entitlement is empty and print "certificates updated", which is a bit of a misnomer since there were no certificates in the first place. This is more correct than the previous error since the update didn't fail, but still isn't clear to the user.

It may be better to say "0 certificates updated" or "no certificates found". Moving to 6.2.

Comment 7 RHEL Program Management 2012-07-10 08:49:26 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2012-07-11 02:07:21 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 9 Adrian Likins 2012-08-01 21:38:13 UTC
This seems to be working now, from a rhel59 box:


Wed Aug  1 17:36:08 2012 [INFO] Starting rhsmcertd...
Wed Aug  1 17:36:08 2012 [INFO] Healing interval: 1440.0 minute(s) [86400 second(s)]
Wed Aug  1 17:36:08 2012 [INFO] Cert check interval: 1.0 minute(s) [60 second(s)]
Wed Aug  1 17:36:08 2012 [INFO] Initial checks will be run now!
Wed Aug  1 17:36:08 2012 [WARN] (Healing) Update failed (255), retry will occur on next run.
Wed Aug  1 17:36:08 2012 [WARN] (Cert Check) Update failed (255), retry will occur on next run.

Looks like change was in:


commit 169b7ca559a08f30bc838cbdd190e4defc59848f
Author: Michael Stead <mstead>
Date:   Wed Jul 11 08:45:44 2012 -0300

    Add wait and now args to rhsmcertd
    
    Can now specify the following args when running rhsmcertd:
    
    --now : Immediately run the initial cert checks
    --wait SECONDS : Wait SECONDS before running the initial cert checks.
    
    The default wait period is 60 seconds. Waiting will occur by default.
    
    NOTE: Old style args are still usable: rhsmcertd 123 123
    
    Various message cleanups.

Comment 13 Shwetha Kallesh 2012-11-07 05:12:00 UTC
Verified!!

[root@rhel-64-server ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.7.18-1
subscription-manager: 1.1.5-1.el6
python-rhsm: 1.1.4-1.el6


[root@rhel-64-server ~]# cat /etc/rhsm/rhsm.conf | grep certFrequency
certFrequency = 1
[root@rhel-64-server ~]# subscription-manager clean
All local data removed


[root@rhel-64-server ~]# service rhsmcertd restart
Stopping rhsmcertd...                                      [FAILED]
Starting rhsmcertd...                                      [  OK  ]



[root@rhel-64-server ~]# tail -f /var/log/rhsm/rhsmcertd.log
Tue Nov  6 22:16:35 2012 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Tue Nov  6 22:18:37 2012 [INFO] (Healing) Certificates updated.
Tue Nov  6 22:18:38 2012 [INFO] (Cert Check) Certificates updated.
Wed Nov  7 02:16:37 2012 [INFO] (Cert Check) Certificates updated.
Wed Nov  7 06:16:37 2012 [INFO] (Cert Check) Certificates updated.
Wed Nov  7 10:03:26 2012 [INFO] rhsmcertd is shutting down...
Wed Nov  7 10:19:22 2012 [INFO] Starting rhsmcertd...
Wed Nov  7 10:19:22 2012 [INFO] Healing interval: 1440.0 minute(s) [86400 second(s)]
Wed Nov  7 10:19:22 2012 [INFO] Cert check interval: 1.0 minute(s) [60 second(s)]
Wed Nov  7 10:19:22 2012 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Wed Nov  7 10:20:22 2012 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Wed Nov  7 10:21:22 2012 [WARN] (Healing) Update failed (255), retry will occur on next run.
Wed Nov  7 10:21:23 2012 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Wed Nov  7 10:21:23 2012 [WARN] (Cert Check) Update failed (255), retry will occur on next run.

Comment 16 errata-xmlrpc 2013-02-21 08:53:23 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-2013-0350.html


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