File pacemaker-systemd-units-dependency-on-resource-agents-deps.patch of Package pacemaker.14737

commit 06e2e269091ba69e699301d8c86c58ef94809be0
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Tue May 2 08:57:08 2017 -0500

    Low: systemd unit files: add dependency on resource-agents-deps
    
    also clean up unit files a bit

diff --git a/lrmd/pacemaker_remote.service.in b/lrmd/pacemaker_remote.service.in
index 6309ad262..86c2fd000 100644
--- a/lrmd/pacemaker_remote.service.in
+++ b/lrmd/pacemaker_remote.service.in
@@ -1,8 +1,13 @@
 [Unit]
 Description=Pacemaker Remote Service
 Documentation=man:pacemaker_remoted http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Pacemaker_Remote/index.html
+
 After=network.target
 After=time-sync.target
+After=resource-agents-deps.target
+Wants=resource-agents-deps.target
+After=syslog.service
+After=rsyslog.service
 
 [Install]
 WantedBy=multi-user.target
diff --git a/mcp/pacemaker.service.in b/mcp/pacemaker.service.in
index 4d17b5224..8ebadc637 100644
--- a/mcp/pacemaker.service.in
+++ b/mcp/pacemaker.service.in
@@ -2,23 +2,35 @@
 Description=Pacemaker High Availability Cluster Manager
 Documentation=man:pacemakerd http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Pacemaker_Explained/index.html
 
-After=dbus.service
-After=basic.target
-After=syslog.service
-After=rsyslog.service
+# DefaultDependencies takes care of sysinit.target,
+# basic.target, and shutdown.target
+
+# We need networking to bind to a network address. It is recommended not to
+# use Wants or Requires with network.target, and not to use
+# network-online.target for server daemons.
 After=network.target
+
+# Time syncs can make the clock jump backward, which messes with logging
+# and failure timestamps, so wait until it's done.
 After=time-sync.target
-After=corosync.service
 
-Requires=dbus.service
-Requires=basic.target
+# Some OCF resources may have dependencies that aren't managed by the cluster;
+# these must be started before Pacemaker and stopped after it. The
+# resource-agents package provides this target, which lets system adminstrators
+# add drop-ins for those dependencies.
+After=resource-agents-deps.target
+Wants=resource-agents-deps.target
+
+After=syslog.service
+After=rsyslog.service
+After=corosync.service
 Requires=corosync.service
-# if you use crm_mon, uncomment the line below.
-# Wants=crm_mon.service
+
 
 [Install]
 WantedBy=multi-user.target
 
+
 [Service]
 Type=simple
 KillMode=process
@@ -62,6 +74,3 @@ Restart=on-failure
 # crm_perror() writes directly to stderr, so ignore it here
 # to avoid double-logging with the wrong format
 StandardError=null
-
-# if you use crm_mon, uncomment the line below.
-# ExecStopPost=/bin/sh -c 'systemctl status crm_mon >/dev/null && systemctl stop crm_mon'
diff --git a/tools/crm_mon.service.in b/tools/crm_mon.service.in
index 1199f5fe0..7ae6649ca 100644
--- a/tools/crm_mon.service.in
+++ b/tools/crm_mon.service.in
@@ -1,6 +1,7 @@
 [Unit]
 Description=Daemon for pacemaker monitor
 Documentation=man:crm_mon
+After=pacemaker.service
 
 [Service]
 Type=forking
openSUSE Build Service is sponsored by