I want to make a DRBD cluster of 2 servers. Both have 2 interfaces bonded together. I want to be able to determine the master role based on connection metric. i.e how many of the network interfaces are connected (not based on ping).
By default server-1 with default priority 5 should be master but if one of its bonded interface goes down then its priority will be reduced by 2 hence promoting server-2 whose default priority is 3, to master role.
I am looking into implementing pacemaker but the documentation is confusing and I can't find any clear example.
UPDATE: trying to work with following config to somehow decide and prefer the node which has most healthy connections.
$pcs resource create eth1-monitor ethmonitor \
interface=eth1 \
name=eth1-monitor \
multiplier=1000 \
repeat_count=2 \
repeat_interval=2 \
op monitor interval="3" timeout="10s" \
--clone
$pcs resource create eth2-monitor ethmonitor \
interface=eth2 \
name=eth2-monitor \
multiplier=999 \
repeat_count=2 \
repeat_interval=2 \
op monitor interval="4" timeout="10s" \
--clone