Page MenuHomeVyOS Platform

Impossible to recreate group in rfc3768-compatibility mode
Closed, ResolvedPublicBUG

Description

There is a bug, which prevents to recreate VRRP groups in rfc3768-compatibility mode (delete + set again) until keepalived will be restarted (not reloaded).

How to reproduce:

  1. Create two or more VRRP groups, at least one in rfc3768-compatibility mode:
set high-availability vrrp group G1 interface 'eth1'
set high-availability vrrp group G1 rfc3768-compatibility
set high-availability vrrp group G1 virtual-address '192.168.5.1/24'
set high-availability vrrp group G1 vrid '10'
set high-availability vrrp group G2 interface 'eth1'
set high-availability vrrp group G2 rfc3768-compatibility
set high-availability vrrp group G2 virtual-address '192.168.6.1/24'
set high-availability vrrp group G2 vrid '11'
  1. Commit configuration and check groups states:
vyos@test-06# run show vrrp 
Name    Interface      VRID  State    Last Transition
------  -----------  ------  -------  -----------------
G1      eth1v10          10  MASTER   3s
G2      eth1v11          11  MASTER   3s
  1. Delete the group which is in rfc3768-compatibility mode, commit:
vyos@test-06# delete high-availability vrrp group G2
[edit]
vyos@test-06# commit
[ high-availability vrrp ]
Reloading the VRRP process

[edit]
vyos@test-06# run show vrrp 
Name    Interface      VRID  State    Last Transition
------  -----------  ------  -------  -----------------
G1      eth1v10          10  MASTER   2s
  1. Create a group with the same VRID and interface again and check it's status:
[edit]
vyos@test-06# set high-availability vrrp group G3 interface 'eth1'
[edit]
vyos@test-06# set high-availability vrrp group G3 rfc3768-compatibility
[edit]
vyos@test-06# set high-availability vrrp group G3 virtual-address '192.168.7.1/24'
[edit]
vyos@test-06# set high-availability vrrp group G3 vrid '11'
[edit]
vyos@test-06# commit
[ high-availability vrrp ]
Reloading the VRRP process

[edit]
vyos@test-06# run show vrrp 
Name    Interface      VRID  State    Last Transition
------  -----------  ------  -------  -----------------
G1      eth1v10          10  MASTER   5s
G3      eth1v11          11  FAULT    5s

This bug is issued by keepalived. The daemon does not work correctly with the deleted interfaces - it assign wrong indexes, which prevent to reuse the same interface again:

------< Global definitions >------
[skipped]
------< VRRP Topology >------
[skipped]
------< Interfaces >------
 Name = eth1v11
   index = 0
[skipped]

This bug was already filed in a newer version of keepalived, but current stable version (2.0.16) is incompatible with the VyOS, because of several another bugs, which was fixed too in the keepalived master branch.
So, we need to wait for the next stable keepalived version or build it from the master.

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.1
Why the issue appeared?
Will be filled on close

Event Timeline

zsdc changed the task status from Open to Confirmed.Jun 23 2019, 10:54 AM
zsdc created this task.
zsdc triaged this task as Normal priority.

The safest solution will be waiting for 2.0.17, test compatibility with VyOS again, and then update keepalived package inside the VyOS.

I am confirming that the problem is not reproducing in the 2.0.17. We should upgrade keepalived distribution.

dmbaturin changed the task status from Confirmed to Needs testing.Jul 18 2019, 10:09 PM

@zsdc I've included keepalived 2.0.17 in the rolling release repo and it will be in tomorrow's nightly build. Please test.

@dmbaturin
Confirmed: the problem is not reproducible anymore in 1.2.0-rolling+201908010337 with keepalived 1:2.0.17+vyos1.2.

zsdc reopened this task as Backport candidate.Aug 1 2019, 9:52 AM

Imported 2.0.17 into crux.