File: pacemaker-cluster-init.sh

package info (click to toggle)
crmsh 5.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (31 lines) | stat: -rwxr-xr-x 674 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -ex

# https://bugs.launchpad.net/bugs/1828228
ulimit -H -l unlimited 2>/dev/null || {
	echo "test disabled for unprivileged namespaces"
	exit 77
}

# ufw currently broken without /sbin/iptables
if ! ufw status; then
	test -e /sbin/iptables  || ln -s /usr/sbin/iptables /sbin/iptables
	test -e /sbin/ip6tables || ln -s /usr/sbin/ip6tables /sbin/ip6tables
fi

service corosync stop

crm cluster init --yes --name=autopkgtest

crm cluster geo_init --yes --clusters=autopkgtest=127.2.2.2 --tickets=ticket1
crm resource start g-booth
sleep 5

crm status

crm status | grep -q booth-ip.*Started
crm status | grep -q booth-site.*Started

: INFO all tests OK
exit 0