summaryrefslogtreecommitdiff
path: root/systemd-units
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-04-12 11:56:51 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-04-12 11:56:51 +0100
commitf593f7c619c9cc11eabf5d9f766935f4d7279079 (patch)
treed6836a3aab4202b08ad57addbc1ee7cc8a45eafb /systemd-units
parentDRBD fixes (diff)
downloadutil-heartbeat-service-1.0.tar.bz2
util-heartbeat-service-1.0.tar.xz
util-heartbeat-service-1.0.zip
Add heartbeat serviceheartbeat-service-1.0
Diffstat (limited to 'systemd-units')
-rw-r--r--systemd-units/heartbeat.service50
1 files changed, 50 insertions, 0 deletions
diff --git a/systemd-units/heartbeat.service b/systemd-units/heartbeat.service
new file mode 100644
index 0000000..6806525
--- /dev/null
+++ b/systemd-units/heartbeat.service
@@ -0,0 +1,50 @@
+[Unit]
+Description=Heartbeat High Availability Cluster Communication and Membership
+# partially copied and adapted from the pacemaker.service file
+
+After=basic.target
+After=network.target
+
+Requires=basic.target
+Requires=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+User=root
+KillMode=process
+NotifyAccess=main
+SysVStartPriority=99
+EnvironmentFile=-/etc/sysconfig/heartbeat
+EnvironmentFile=-/etc/sysconfig/pacemaker
+
+ExecStart=/usr/lib/heartbeat/heartbeat -f
+ExecStop=/usr/lib/heartbeat/heartbeat -k
+PIDFile=/var/run/heartbeat.pid
+
+# If heartbeat/pacemaker doesn't stop, its probably waiting on a cluster
+# resource. Sending -KILL will just get the node fenced
+SendSIGKILL=no
+
+# If we ever hit the StartLimitInterval/StartLimitBurst limit and the
+# admin wants to stop the cluster while pacemakerd is not running, it
+# might be a good idea to enable the ExecStopPost directive below.
+#
+# Although the node will likely end up being fenced as a result so its
+# not on by default
+#
+# ExecStopPost=/usr/bin/killall -TERM crmd attrd fenced cib pengine lrmd
+
+# Uncomment this for older versions of systemd that didn't support
+# TimeoutStopSec
+# TimeoutSec=30min
+
+# Heartbeat/Pacemaker can only exit after all managed services have shut down
+# A HA database could conceivably take even longer than this
+TimeoutStopSec=30min
+TimeoutStartSec=60s
+
+# Restart options include: no, on-success, on-failure, on-abort or always
+Restart=no