1

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
bakasan
  • 103
  • 1
  • 11
  • 1
    you can use ethmonitor with multiplicator parameter and do the same like using ping resource agent. – c4f4t0r Feb 04 '18 at 00:11
  • @c4f4t0r I am trying to do that. But it seems like multiplier in ethmonitor is useless. I was hoping to somehow add the value of 2 ethmonitor attributes and do comparison then choose the node with higher score but that doesn't seem to be possible. unlike ping targets the score of multiple interfaces does not seem to add up or do anything similar. – bakasan Feb 28 '18 at 08:18
  • edit your question and show your cluster config and explain why miltiplier in ethmonitor is useless, if that's true you can report a bug to the project. – c4f4t0r Feb 28 '18 at 11:01
  • @c4f4t0r I have edited the question, and its not a bug but I think more of a limitation of pacemaker or ethmonitor RA. What I want to achieve is to somehow apply a location rule based on `eth1-monitor` and `eth2-monitor` .. It would have been better if we could monitor multiple interfaces using single instance of ethmonitor similar to how we can monitor multiple hosts using single instance of ping RA. – bakasan Feb 28 '18 at 12:15
  • because using ping resource agent you can monitor a list of host, but I don't think the logic for ethmonitor is the same, any way, you can create more resource and many rules to archive what you want, I don't see any big issue with ethmonitor. – c4f4t0r Feb 28 '18 at 14:06

0 Answers0