7

This seems like a simple question, but one I can't seem to find the answer for despite going over the pacemaker documentation multiple times.

I've got corosync set up with pacemaker to share a virtual IP. All I want to do is to set a timeout value before the backup node takes over the resource. With network outages of <1-2 minutes I'd like pacemaker to just continue on as normal instead of triggering failover, but switch it over if the outage is over a certain number.

There is a timeout for a resource - but this seems to be a the timeout waiting for the resource to start, not for the cluster as a whole.

user705142
  • 433
  • 6
  • 16

1 Answers1

3

It sounds like migration-threshold is what you're looking for.

Assumming that you have a resource which is setting op monitor interval to 20s:

primitive p_foo ocf:heartbeat:foo \
    params ...
    op monitor interval="20s"

and you want it doesn't migrate to a new node within 1 minute, so you should set migration-threshold to 3:

primitive p_foo ocf:heartbeat:foo \
    params ...
    op monitor interval="20s"
    meta target-role="Started" migration-threshold="3"
quanta
  • 50,327
  • 19
  • 152
  • 213
  • 1
    At the moment I've got corosync with a 'token' of 4 minutes, which seems to do what I want. Assuming that works fine, would this any better? – user705142 Aug 13 '12 at 00:58
  • @user705142 a cluster that doesn't react to a network outages, for me isn't a cluster. – c4f4t0r Sep 15 '16 at 10:04