networking runtime_error ai_generated true

VRRP: Preempt delay expired, transitioning to MASTER state on interface eth0

ID: networking/vrrp-preempt-delay-expired

Also available as: JSON · Markdown · 中文
85%Fix Rate
83%Confidence
1Evidence
2023-09-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
keepalived 2.2.8 active
FRRouting 9.1 active
Linux kernel 6.1 active

Root Cause

A VRRP backup router with higher priority waited through the configured preempt delay and is now taking over as master, which may cause transient traffic disruption if the previous master is still active.

generic

中文

具有更高优先级的VRRP备份路由器等待了配置的抢占延迟后,正在接管为主路由器,如果前主路由器仍活跃,可能会导致短暂流量中断。

Official Documentation

https://datatracker.ietf.org/doc/html/rfc5798

Workarounds

  1. 90% success Ensure the previous master gracefully transitions by setting a lower priority on it: in keepalived.conf, set priority 100 on old master, priority 150 on new master, then reload both: systemctl reload keepalived
    Ensure the previous master gracefully transitions by setting a lower priority on it: in keepalived.conf, set priority 100 on old master, priority 150 on new master, then reload both: systemctl reload keepalived
  2. 85% success Monitor VRRP state transitions and adjust preempt delay if flapping occurs: grep 'VRRP' /var/log/syslog ; increase delay with vrrp_skip_check_adv_addr and vrrp_garp_master_delay in keepalived.conf
    Monitor VRRP state transitions and adjust preempt delay if flapping occurs: grep 'VRRP' /var/log/syslog ; increase delay with vrrp_skip_check_adv_addr and vrrp_garp_master_delay in keepalived.conf

中文步骤

  1. Ensure the previous master gracefully transitions by setting a lower priority on it: in keepalived.conf, set priority 100 on old master, priority 150 on new master, then reload both: systemctl reload keepalived
  2. Monitor VRRP state transitions and adjust preempt delay if flapping occurs: grep 'VRRP' /var/log/syslog ; increase delay with vrrp_skip_check_adv_addr and vrrp_garp_master_delay in keepalived.conf

Dead Ends

Common approaches that don't work:

  1. 70% fail

    This prevents the higher-priority router from taking over, defeating the purpose of VRRP for failover scenarios.

  2. 60% fail

    Instant preemption can cause flapping if the previous master has not yet released the IP; a non-zero delay is intentional for stability.