Description
When creating an HA cluster using a dedicated VRRP interface with a logical name different from lan, such as trunk_ha, the Keepalived configuration is initially created using lan_* identifiers.
The initial configuration for trunk_ha is created with sections and names such as lan_ha, lan_track and lan_delays. When a real interface named lan is later added to the HA monitored interfaces, its HA configuration is corrupted when the VRRP interface is not named lanconfiguration reuses the same identifiers and overwrites the tracking and delay configuration previously associated with the VRRP interface.
This corrupts the HA configuration because the VRRP interface tracking can be replaced by the lan interface tracking, potentially breaking failover behavior.
Steps to reproduce
- Create an interface to be used for VRRP with a name different from
lan, for example trunk_ha.
- Initialize the HA cluster using
trunk_ha as the VRRP interface.
- Create another interface named
lan.
- Add the
lan interface to the HA monitored interfaces.
- Check
/etc/config/keepalived.
Actual behavior
The initial HA configuration for trunk_ha uses lan_* identifiers, for example:
config track_interface 'lan_track'
option name 'lan_ha'
option value 'eth0'
option ns_link 'network/trunk_ha'
config interface_up_down_delays 'lan_delays'
option device 'eth0'
After adding the real lan interface to HA, the same sections are reused and overwritten:
config track_interface 'lan_track'
option name 'lan_ha'
option value 'eth3'
option ns_link 'network/lan'
config interface_up_down_delays 'lan_delays'
option device 'eth3'
As a result, the tracking and delay configuration for the original VRRP interface is lost or changed to point to the lan interface.
Expected behavior
The HA initialization should not hardcode lan_* identifiers when the VRRP interface is not named lan.
If the VRRP interface is named trunk_ha, Keepalived sections should use identifiers derived from that interface name, for example:
config track_interface 'trunk_ha_track'
option name 'trunk_ha_ha'
option value 'eth0'
option ns_link 'network/trunk_ha'
config interface_up_down_delays 'trunk_ha_delays'
option device 'eth0'
When a real lan interface is later added to HA, it should create independent lan_* sections without overwriting the VRRP interface configuration.
Components
NethSecurity 8.7.2.
Description
When creating an HA cluster using a dedicated VRRP interface with a logical name different from
lan, such astrunk_ha, the Keepalived configuration is initially created usinglan_*identifiers.The initial configuration for
trunk_hais created with sections and names such aslan_ha,lan_trackandlan_delays. When a real interface namedlanis later added to the HA monitored interfaces, its HA configuration is corrupted when the VRRP interface is not namedlanconfiguration reuses the same identifiers and overwrites the tracking and delay configuration previously associated with the VRRP interface.This corrupts the HA configuration because the VRRP interface tracking can be replaced by the
laninterface tracking, potentially breaking failover behavior.Steps to reproduce
lan, for exampletrunk_ha.trunk_haas the VRRP interface.lan.laninterface to the HA monitored interfaces./etc/config/keepalived.Actual behavior
The initial HA configuration for
trunk_hauseslan_*identifiers, for example:After adding the real
laninterface to HA, the same sections are reused and overwritten:As a result, the tracking and delay configuration for the original VRRP interface is lost or changed to point to the
laninterface.Expected behavior
The HA initialization should not hardcode
lan_*identifiers when the VRRP interface is not namedlan.If the VRRP interface is named
trunk_ha, Keepalived sections should use identifiers derived from that interface name, for example:When a real
laninterface is later added to HA, it should create independentlan_*sections without overwriting the VRRP interface configuration.Components
NethSecurity 8.7.2.