Bug 708512 - rhsmcertd is logging "certificates updated" when it should be "update failed (255), retry in 1 minutes"
rhsmcertd is logging "certificates updated" when it should be "update failed ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity low
: beta
: 6.3
Assigned To: Bryan Kearney
Entitlement Bugs
: Rebase
Depends On:
Blocks: 771481 756082
  Show dependency treegraph
 
Reported: 2011-05-27 16:43 EDT by John Sefler
Modified: 2014-02-13 03:10 EST (History)
5 users (show)

See Also:
Fixed In Version: subscription-manager-1.0.10-1
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:53:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2011-05-27 16:43:52 EDT
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 13:40:22 EDT
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 Product and Program Management 2012-07-10 04:49:26 EDT
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 Product and Program Management 2012-07-10 22:07:21 EDT
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 17:38:13 EDT
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@redhat.com>
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 00:12:00 EST
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 03:53:23 EST
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.