[VRRP] startup-delay prevents preemption with lower preempt-delay

Hey guys!

Before opening a bug report, I wanted to share my observations to make sure there is no misunderstanding at my part.
We have a testing environment with two routers (router1 and router2) with a bunch of VRRP interfaces. After updating from 1.3.2 LTS to 1.3.3 LTS I was testing the global startup-delay for VRRP. The config for router1 looks like this:

# show high-availability vrrp 
 global-parameters {
     startup-delay 30
 }
 group adm {
     address 10.236.250.65/27 {
     }
     hello-source-address 10.236.250.66
     interface eth10
     peer-address 10.236.250.67
     preempt-delay 10
     priority 200
     vrid 65
 }

router2 has the exact same configuration except for a lower priority. While VRRP in general is still working just fine, I noticed that when I reboot router1, it takes a very long time (about 8 minutes) for preemption to kick in and setting router1 as the master again.
I started playing around with different values for startup-delay and preempt-delay and noticed some behaviour I do not quite understand.

Here is a summary:

  • with startup-delay 30 and no preempt-delay configured, preemption takes way longer than expected
  • in order for preemption to work with the configured preempt-delay, startup-delay needs to be configured with a lower value than preempt-delay
  • a relatively high value for startup-delay like 120 prevents preemption entirely (at least in the 20 minute timeframe I observed)

The same is true for 1.4-rolling-202307110317 btw.

Am I missing here something or is this a bug?

well ,we some concept that are no compatible ,startup-delay is used when we want no-preempt the router after restart :

https://docs.vyos.io/en/latest/configuration/highavailability/index.html#cfgcmd-set-high-availability-vrrp-global-parameters-startup-delay-1-600

so it shouldn’t use with prepend delay which is used to wait X second to wait to the master router when it fails :

https://docs.vyos.io/en/latest/configuration/highavailability/index.html#preemption

based on your goals , you would use one or the other

Thank you for your explaination! I guess it would be helpful to mention this correlation in the docs.

1 Like

Hi,

looking at the keepalived docs, it should work as @kdkmholz explained. I’ve been browsing through the keepalived commits and it seems like some fixes went in after keepalived 2.2.7. Maybe it’s an option to upgrade to keepalived 2.2.8 in VyOS?

Sander