|
rpm-build |
3ee90c |
[Unit]
|
|
rpm-build |
3ee90c |
Description=Pacemaker High Availability Cluster Manager
|
|
rpm-build |
3ee90c |
Documentation=man:pacemakerd
|
|
rpm-build |
3ee90c |
Documentation=https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# DefaultDependencies takes care of sysinit.target,
|
|
rpm-build |
3ee90c |
# basic.target, and shutdown.target
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# We need networking to bind to a network address. It is recommended not to
|
|
rpm-build |
3ee90c |
# use Wants or Requires with network.target, and not to use
|
|
rpm-build |
3ee90c |
# network-online.target for server daemons.
|
|
rpm-build |
3ee90c |
After=network.target
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Time syncs can make the clock jump backward, which messes with logging
|
|
rpm-build |
3ee90c |
# and failure timestamps, so wait until it's done.
|
|
rpm-build |
3ee90c |
After=time-sync.target
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Managing systemd resources requires DBus.
|
|
rpm-build |
3ee90c |
After=dbus.service
|
|
rpm-build |
3ee90c |
Wants=dbus.service
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Some OCF resources may have dependencies that aren't managed by the cluster;
|
|
rpm-build |
3ee90c |
# these must be started before Pacemaker and stopped after it. The
|
|
rpm-build |
3ee90c |
# resource-agents package provides this target, which lets system adminstrators
|
|
rpm-build |
3ee90c |
# add drop-ins for those dependencies.
|
|
rpm-build |
3ee90c |
After=resource-agents-deps.target
|
|
rpm-build |
3ee90c |
Wants=resource-agents-deps.target
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
After=syslog.service
|
|
rpm-build |
3ee90c |
After=rsyslog.service
|
|
rpm-build |
3ee90c |
After=corosync.service
|
|
rpm-build |
3ee90c |
Requires=corosync.service
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
[Install]
|
|
rpm-build |
3ee90c |
WantedBy=multi-user.target
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
[Service]
|
|
rpm-build |
3ee90c |
Type=simple
|
|
rpm-build |
3ee90c |
KillMode=process
|
|
rpm-build |
3ee90c |
NotifyAccess=main
|
|
rpm-build |
3ee90c |
EnvironmentFile=-@CONFIGDIR@/pacemaker
|
|
rpm-build |
3ee90c |
EnvironmentFile=-@CONFIGDIR@/sbd
|
|
rpm-build |
3ee90c |
SuccessExitStatus=100
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
ExecStart=@sbindir@/pacemakerd -f
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Systemd v227 and above can limit the number of processes spawned by a
|
|
rpm-build |
3ee90c |
# service. That is a bad idea for an HA cluster resource manager, so disable it
|
|
rpm-build |
3ee90c |
# by default. The administrator can create a local override if they really want
|
|
rpm-build |
3ee90c |
# a limit. If your systemd version does not support TasksMax, and you want to
|
|
rpm-build |
3ee90c |
# get rid of the resulting log warnings, comment out this option.
|
|
rpm-build |
3ee90c |
TasksMax=infinity
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# If pacemakerd doesn't stop, it's probably waiting on a cluster
|
|
rpm-build |
3ee90c |
# resource. Sending -KILL will just get the node fenced
|
|
rpm-build |
3ee90c |
SendSIGKILL=no
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# If we ever hit the StartLimitInterval/StartLimitBurst limit, and the
|
|
rpm-build |
3ee90c |
# admin wants to stop the cluster while pacemakerd is not running, it
|
|
rpm-build |
3ee90c |
# might be a good idea to enable the ExecStopPost directive below.
|
|
rpm-build |
3ee90c |
#
|
|
rpm-build |
3ee90c |
# However, the node will likely end up being fenced as a result, so it's
|
|
rpm-build |
3ee90c |
# not enabled by default.
|
|
rpm-build |
3ee90c |
#
|
|
rpm-build |
3ee90c |
# ExecStopPost=/usr/bin/killall -TERM pacemaker-attrd pacemaker-based \
|
|
rpm-build |
3ee90c |
# pacemaker-controld pacemaker-execd pacemaker-fenced \
|
|
rpm-build |
3ee90c |
# pacemaker-schedulerd
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# If you want Corosync to stop whenever Pacemaker is stopped,
|
|
rpm-build |
3ee90c |
# uncomment the next line too:
|
|
rpm-build |
3ee90c |
#
|
|
rpm-build |
3ee90c |
# ExecStopPost=/bin/sh -c 'pidof pacemaker-controld || killall -TERM corosync'
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Pacemaker will restart along with Corosync if Corosync is stopped while
|
|
rpm-build |
3ee90c |
# Pacemaker is running.
|
|
rpm-build |
3ee90c |
# In this case, if you want to be fenced always (if you do not want to restart)
|
|
rpm-build |
3ee90c |
# uncomment ExecStopPost below.
|
|
rpm-build |
3ee90c |
#
|
|
rpm-build |
3ee90c |
# ExecStopPost=/bin/sh -c 'pidof corosync || \
|
|
rpm-build |
3ee90c |
# /usr/bin/systemctl --no-block stop pacemaker'
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# When the service functions properly, it will wait to exit until all resources
|
|
rpm-build |
3ee90c |
# have been stopped on the local node, and potentially across all nodes that
|
|
rpm-build |
3ee90c |
# are shutting down. The default of 30min should cover most typical cluster
|
|
rpm-build |
3ee90c |
# configurations, but it may need an increase to adapt to local conditions
|
|
rpm-build |
3ee90c |
# (e.g. a large, clustered database could conceivably take longer to stop).
|
|
rpm-build |
3ee90c |
TimeoutStopSec=30min
|
|
rpm-build |
3ee90c |
TimeoutStartSec=60s
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# Restart options include: no, on-success, on-failure, on-abort or always
|
|
rpm-build |
3ee90c |
Restart=on-failure
|
|
rpm-build |
3ee90c |
|
|
rpm-build |
3ee90c |
# crm_perror() writes directly to stderr, so ignore it here
|
|
rpm-build |
3ee90c |
# to avoid double-logging with the wrong format
|
|
rpm-build |
3ee90c |
StandardError=null
|