Table of Contents
Note
# firewall-cmd --permanent --add-service=high-availability success # firewall-cmd --reload success
Note
[root@pcmk-1 ~]# setenforce 0 [root@pcmk-1 ~]# sed -i.bak "s/SELINUX=enforcing/SELINUX=permissive/g" /etc/selinux/config [root@pcmk-1 ~]# systemctl mask firewalld.service [root@pcmk-1 ~]# systemctl stop firewalld.service [root@pcmk-1 ~]# iptables --flush
/etc/corosync/corosync.conf
. That config file must be initialized with information about the cluster nodes before pacemaker can start.
pcs
command, replacing the cluster name and hostname as desired:
# pcs cluster setup --force --local --name mycluster example-host
Note
# mkdir -p --mode=0750 /etc/pacemaker # chgrp haclient /etc/pacemaker
# dd if=/dev/urandom of=/etc/pacemaker/authkey bs=4096 count=1
Note
# pcs cluster start
# pcs status corosync Membership information ---------------------- Nodeid Votes Name 1 1 example-host (local)
# pcs status Cluster name: mycluster WARNING: no stonith devices and stonith-enabled is not false Last updated: Fri Oct 9 15:18:32 2015 Last change: Fri Oct 9 12:42:21 2015 by root via cibadmin on example-host Stack: corosync Current DC: NONE 1 node and 0 resources configured Node example-host: UNCLEAN (offline) Full list of resources: PCSD Status: example-host: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled
# pcs status Cluster name: mycluster WARNING: no stonith devices and stonith-enabled is not false Last updated: Fri Oct 9 15:20:05 2015 Last change: Fri Oct 9 12:42:21 2015 by root via cibadmin on example-host Stack: corosync Current DC: example-host (version 1.1.13-a14efad) - partition WITHOUT quorum 1 node and 0 resources configured Online: [ example-host ] Full list of resources: PCSD Status: example-host: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled
# pcs property set stonith-enabled=false # pcs property set no-quorum-policy=ignore
Warning
stonith-enabled=false
is completely inappropriate for a production cluster. It tells the cluster to simply pretend that failed nodes are safely powered off. Some vendors will refuse to support clusters that have STONITH disabled. We disable STONITH here only to focus the discussion on pacemaker_remote, and to be able to use a single physical host in the example.
# pcs status Cluster name: mycluster Last updated: Fri Oct 9 15:22:49 2015 Last change: Fri Oct 9 15:22:46 2015 by root via cibadmin on example-host Stack: corosync Current DC: example-host (version 1.1.13-a14efad) - partition with quorum 1 node and 0 resources configured Online: [ example-host ] Full list of resources: PCSD Status: example-host: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled
# pcs cluster stop --force
# yum install -y kvm libvirt qemu-system qemu-kvm bridge-utils virt-manager # systemctl enable libvirtd.service
Note