February 2020
Intermediate to advanced
734 pages
38h 13m
English
If we use firewall rules, we can even watch the fencing process in action. In our cluster, the IP addresses 10.0.30.2 and 10.0.30.3 correspond to the standby and witness respectively. We can block all traffic from those nodes with these commands:
sudo iptables -A OUTPUT -s 10.0.30.2/32 -j REJECT sudo iptables -A OUTPUT -s 10.0.30.3/32 -j REJECT sudo iptables -A INPUT -s 10.0.30.2/32 -j REJECT sudo iptables -A INPUT -s 10.0.30.3/32 -j REJECT
Then we would want to observe the primary's reaction by watching the log like this:
tail -f /var/log/postgresql/repmgr.log
After a few seconds, the primary will notice that communication to both the standby and witness is no longer possible. This is what the logs look will like at this ...
Read now
Unlock full access