Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "route-propagation-delay SECONDS" field to keepalived. #2555

Open
harisasank opened this issue Mar 3, 2025 · 0 comments
Open

add "route-propagation-delay SECONDS" field to keepalived. #2555

harisasank opened this issue Mar 3, 2025 · 0 comments

Comments

@harisasank
Copy link

I have a usecase where I need to to provide HA between multiple datacenters connected over public internet. I have keepalived running on a publicly accessible endpoint in each of the DCs.
A VRRP master is elected between these nodes (in L3 Unicast mode), such that all the internal services are accessed via the VRRP master.
If the L3 connectivity between these nodes is severed for MDT interval, the backup will take over as master. (as expected). When the HA cluster network is restored, all the routes must be propagated to all peers before a new master is re-elected.
Before the routing protocols converge among all peers, a given peer doesnt receive all messages which can lead it into believing that it is alone, and should take over as master.
This results in a split brain case where where more than one VRRP nodes own the VRRP VIP and we have more than one master.

startup-delay wont work here because it only applies when keepalived daemon restarts, and preempt delay does nt get applied here,
because it is only triggered when the node receives a VRRP advertisement of a higher priority then the instance's local priority.
Increasing advertisement intervals increases the master switchover time, and cannot compensate for BGP convergence time (if one is using BGP as we are) which can be in order of several 10s of seconds or even minutes.

In order to avoid this stituation, a new field "route-propagation-delay SECONDS" can be added to the per instance vrrp config, which basically does the following:

  1. When a VRRP node moves from FAULT state to BACKUP and eventually to MASTER (after MDT timeout), wait for an additional "route-propagation-delay" time if such a field is set.
  2. During this delay, all the advertisements that are received from master are ignored (just like startup-delay).
  3. This will be applied every time the node exits out of FAULT state and does not directly to master. This feature is not supported with initial state master and vrrp strict mode. (like preempt delay)
  4. Needless to say, no behavioral change if "route-propagation-delay" is not set in the configuration.

I can send patches to support this feature if this is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant