1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/bin/sh
set -e
ulimit -H -l unlimited 2>/dev/null || {
# https://bugs.launchpad.net/bugs/1828228
echo "test disabled for unprivileged namespaces"
exit 77
}
# setup TLS certificates
corosync-qdevice-net-certutil -i -c /etc/corosync/qnetd/nssdb/qnetd-cacert.crt 2>&1
corosync-qdevice-net-certutil -r -n debian 2>&1
corosync-qnetd-certutil -s -c /etc/corosync/qdevice/net/nssdb/qdevice-net-node.crq -n debian 2>&1
corosync-qdevice-net-certutil -M -c /etc/corosync/qnetd/nssdb/cluster-debian.crt 2>&1
# service config
cat >>/etc/corosync/corosync.conf <<EOF
quorum {
device {
model: net
votes: 1
net {
host: 127.0.0.1
}
}
}
EOF
# service start
corosync-cfgtool -R
service corosync-qdevice start
# service status
service corosync status
service corosync-qnetd status
service corosync-qdevice status
# wait for qdevice to connect
sleep 3
# quorum status
printf "\n=== corosync-qdevice-tool ===\n"
corosync-qdevice-tool -v -s
printf "\n=== corosync-qnetd-tool ===\n"
corosync-qnetd-tool -v -s
corosync-qnetd-tool -v -l
printf "\n=== corosync-quorumtool ===\n"
corosync-quorumtool || true
|