Bug 818978

Summary: Missing systemD unit file
Product: Red Hat Enterprise Linux 5 Reporter: Alex Sersen <asersen>
Component: subscription-managerAssignee: Michael Stead <mstead>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.10CC: azelinka, bkearney, jesusr, jgalipea, jsefler, mmaslano, mstead, ohudlick
Target Milestone: beta   
Target Release: 5.10   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: 1.8.2 Doc Type: Bug Fix
Doc Text:
Cause: Missing systemd script Consequence: Fix: added systemd style init scripts for rhsmcertd Result: rhsmcertd is now able to be started using systemctl
Story Points: ---
Clone Of:
: 833581 (view as bug list) Environment:
Last Closed: 2013-09-30 22:48:42 UTC Type: Bug
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: 840995, 920191    

Description Alex Sersen 2012-05-04 13:58:05 UTC
Hi,

the script has marked your component with error 'missing systemD unit file'. Please review, comment and/or fix it.

Useful links:
http://fedoraproject.org/wiki/Features/SysVtoSystemd
http://fedoraproject.org/wiki/Features/systemd

Comment 1 Michael Stead 2012-06-19 14:46:56 UTC
systemd file was added.

Changes committed to subscription-manager master branch:
613a07f79b6d814d7f47bf94641722b3dffee2a5

Comment 2 Michael Stead 2012-07-16 17:24:29 UTC
This fix introduces an issue where the rhsmcertd systemd service will fail the initial cert/healing checks on startup due to the fact that we could not guarantee that the network interfaces would be ready when the system was restarted.

There was an option to enable the "NetworkManager-wait-online" service to force the service to wait for NetworkManager to load completely, but since this could potentially cause the system boot time to increase in case of a network issue, we have opted to have the rhsmcertd daemon to wait for 2 minutes before running its first checks.

As part of this work, we have done some refactoring on the rhsmcertd service:
- properly read config values
- added opt arg style arguements (old style is still supported but is depricated)

Run "rhsmcertd --help" for more information on the arguements.

These changes have been committed to the maseter branch:
f8104aacb435556d16e0dd4536b4c49c23a13925

The changes are available in: subscription-manager-1.0.10-1

Comment 4 Bryan Kearney 2013-02-08 17:18:32 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 5 John Sefler 2013-03-06 22:16:28 UTC
Verifying Version...
[root@jsefler-r70 ~]# rpm -q subscription-manager
subscription-manager-1.8.2-1.el7.x86_64

[root@jsefler-r70 ~]# rpm -ql subscription-manager | grep systemd
/usr/lib/systemd/system/rhsmcertd.service
[root@jsefler-r70 ~]# systemctl list-unit-files | grep rhsmcertd
rhsmcertd.service                           enabled 
[root@jsefler-r70 ~]# systemctl is-enabled rhsmcertd.service
enabled
[root@jsefler-r70 ~]# systemctl is-active rhsmcertd.service
active
[root@jsefler-r70 ~]# systemctl status rhsmcertd.service
rhsmcertd.service - Enable periodic update of entitlement certificates.
	  Loaded: loaded (/usr/lib/systemd/system/rhsmcertd.service; enabled)
	  Active: active (running) since Wed 2013-03-06 16:35:12 EST; 15min ago
	 Process: 988 ExecStart=/usr/bin/rhsmcertd (code=exited, status=0/SUCCESS)
	Main PID: 997 (rhsmcertd)
	  CGroup: name=systemd:/system/rhsmcertd.service
		  └─997 /usr/bin/rhsmcertd

Mar 06 16:35:11 jsefler-r70.usersys.redhat.com systemd[1]: Starting Enable periodic update of entitlement certificates....
Mar 06 16:35:12 jsefler-r70.usersys.redhat.com systemd[1]: Started Enable periodic update of entitlement certificates..

VERIFIED: systemd rhsmcertd.service is now provided, enabled, active and running on rhel7


[root@jsefler-r70 ~]# systemctl restart rhsmcertd.service
[root@jsefler-r70 ~]# tail -f /var/log/rhsm/rhsmcertd.log 
Wed Mar  6 16:35:12 2013 [INFO] Healing interval: 1440.0 minute(s) [86400 second(s)]
Wed Mar  6 16:35:12 2013 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Wed Mar  6 16:35:12 2013 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Wed Mar  6 16:37:13 2013 [WARN] (Healing) Update failed (255), retry will occur on next run.
Wed Mar  6 16:37:13 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Wed Mar  6 16:57:33 2013 [INFO] rhsmcertd is shutting down...
Wed Mar  6 16:57:33 2013 [INFO] Starting rhsmcertd...
Wed Mar  6 16:57:33 2013 [INFO] Healing interval: 1440.0 minute(s) [86400 second(s)]
Wed Mar  6 16:57:33 2013 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Wed Mar  6 16:57:33 2013 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Wed Mar  6 16:59:33 2013 [WARN] (Healing) Update failed (255), retry will occur on next run.
Wed Mar  6 16:59:34 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
^C
[root@jsefler-r70 ~]# 

VERIFIED: the hard-coded 2 minute delay before attempting to communicate with the candlepin server upon starting the rhsmcertd service is demonstrated above in the rhsmcertd.log

Comment 6 RHEL Program Management 2013-04-09 20:50:46 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 8 errata-xmlrpc 2013-09-30 22:48:42 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-1332.html