After that there should be a crash file at /var/crash/ in some of the nodes.
Inorder to force the crash again:
* Check with crm_mon which node is promoted.
* run: pcs node standby <promotednodename>
* Check crm_mon again until the node gets in standby mode (without resources running).
** It will take a really long time.
* A crash will be created on the other node.
Hi!
Sure, here we go.
[Test Case]
lxc launch ubuntu:22.04 node1 @'localhost' " @'localhost' " enabled= false policy= ignore _user=replicato r \
lxc shell node1
apt update && apt dist-upgrade -y
apt install pcs mysql-server resource-agents -y
echo hacluster:hacluster | chpasswd
mysql -e "CREATE USER 'replicator'
mysql -e "GRANT RELOAD, PROCESS, SUPER, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator'
systemctl disable mysql.service
systemctl stop mysql.service
exit
lxc copy node1 node2
lxc start node2
lxc shell node1
pcs host auth node1 node2 -u hacluster -p hacluster
pcs cluster setup --force mysqlclx node1 node2 transport udpu
pcs cluster enable --all
pcs cluster start --all
pcs property set stonith-
pcs property set no-quorum-
pcs resource create p_mysql ocf:heartbeat:mysql \
replication
test_user=root \
op demote interval=0s timeout=120 monitor interval=20 timeout=30 monitor \
interval=10 role=Master timeout=30 monitor interval=30 role=Slave timeout=30 \
notify interval=0s timeout=90 promote interval=0s timeout=120 start \
interval=0s timeout=120 stop interval=0s timeout=120 meta notify=true
pcs resource promotable p_mysql p_mysql-master notify=true
[/Test Case]
After that there should be a crash file at /var/crash/ in some of the nodes.
Inorder to force the crash again:
* Check with crm_mon which node is promoted.
* run: pcs node standby <promotednodename>
* Check crm_mon again until the node gets in standby mode (without resources running).
** It will take a really long time.
* A crash will be created on the other node.
Hope it helps. Kind regards.