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

netlink: do not ignore vip as system owner #2229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Nov 17, 2022

  1. netlink: do not ignore vip as system owner

    When a VRRP instance is waiting for an IP address on the interface to
    start, if the vip is added on the interface, keepalived ignores it and
    remains in FAULT state, even if the VRRP instance is the system owner
    (priority 255 and vip = system IP). However, when adding an IP address
    different than the vip, the instance can change the state.
    
    This makes nonsense for an instance is configured as the system owner
    transit to FAULT state since the system has not yet the vip.
    When the vip is added to the system, keepalived ignores it
    and this instance remains in FAULT state, whereas an IP address
    different than the vip can change the state of this instance.
    
    Thus, do not ignore if a vip is added to the system when a VRRP
    instance is configured with 255 priority.
    
    Signed-off-by: Loïc Sang <[email protected]>
    Loïc Sang committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    3904867 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2023

  1. netlink: do not ignore vip as system owner

    When a VRRP instance is waiting for an IP address on the interface to
    start, if the vip is added on the interface, keepalived ignores it and
    remains in FAULT state, even if the VRRP instance is the system owner
    (priority 255 and vip = system IP). However, when adding an IP address
    different than the vip, the instance can change the state.
    
    This makes nonsense for an instance is configured as the system owner
    transit to FAULT state since the system has not yet the vip.
    When the vip is added to the system, keepalived ignores it
    and this instance remains in FAULT state, whereas an IP address
    different than the vip can change the state of this instance.
    
    Thus, do not ignore if a vip is added to the system when a VRRP
    instance is configured with 255 priority.
    
    Signed-off-by: Loïc Sang <[email protected]>
    Loïc Sang committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    901d2b5 View commit details
    Browse the repository at this point in the history
  2. vrrp: prepare options for vrrp system owner instance

    Add a global option "vrrp_system_owner" to define the
    behavior of a vrrp configured with 255 priority (system owner):
    
    - The VRRP_FLAG_SYSTEM_OWNER_DFT is the current implementation.
    A system owner instance can transit with any IP address on the physical
    interafce. This is the default option when vrrp_system_owner is not defined.
    
    - With VRRP_FLAG_SYSTEM_OWNER_ANY, a system owner instance can transit
    with any VIP configured on the physical interface. To use, that define
    "vrrp_system_owner any" in keepalived.conf.
    
    - With VRRP_FLAG_SYSTEM_OWNER_STRICT, a system owner instance can
    transit when all VIPs are configured on the physical interface.
    To use that, define "vrrp_system_owner strict" in keepalived.conf.
    
    Signed-off-by: Loïc Sang <[email protected]>
    Loïc Sang committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    7683c2c View commit details
    Browse the repository at this point in the history
  3. vrrp: enhance vrrp instance with priority 255

    Add two more options for a vrrp instance with 255 priority (system owner)
    i) Remain in fault state until all the VIPs have been added.
    For that, set "vrrp_system_owner strict" in keepalived.conf.
    
    ii) If any of the VIPs exists, add all the remaining VIPs.
    For that, set "vrrp_system_owner any" in keepalived.conf.
    
    iii) Go to MASTER state if there is an IP address on the VRRP instance's
    interface (this it current implemenation).
    This is the default behaviour, if vrrp_system_owner is not configured.
    
    Signed-off-by: Loïc Sang <[email protected]>
    Loïc Sang committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    af71911 View commit details
    Browse the repository at this point in the history