Page MenuHomeVyOS Platform

VRRP failed to start if any of its interaces not exist
Closed, ResolvedPublicBUG

Description

lets imagine the following situation:
There is 5 interfaces (vlans) and 5 vrrp groups and everything working fine.
I'm going to create 6th vlan + 6th vrrp group.
if I've created 6th vrrp group but forgot to create 6th vlan interface and executed "commit" command, the VRRP will stop working completely!

Here is VRRP log:

Aug 15 22:38:11 R9 Keepalived_vrrp[29368]: Opening file '/etc/keepalived/keepalived.conf'.
Aug 15 22:38:11 R9 Keepalived_vrrp[29368]: (Line 61) WARNING - interface eth0.356 for vrrp_instance VLAN-356 doesn't exist
Aug 15 22:38:11 R9 Keepalived_vrrp[29368]: Non-existent interface specified in configuration
Aug 15 22:38:11 R9 Keepalived_vrrp[29368]: Stopped
Aug 15 22:38:11 R9 Keepalived[29367]: Keepalived_vrrp exited with permanent error CONFIG. Terminating

Details

Difficulty level
Unknown (require assessment)
Version
1.2.2
Why the issue appeared?
Will be filled on close

Event Timeline

Harliff updated the task description. (Show Details)
Harliff updated the task description. (Show Details)
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
zsdc changed the task status from Open to In progress.Dec 31 2019, 9:20 PM
Viacheslav added a subscriber: Viacheslav.

Fixed

vyos@r4-roll# run show version 

Version:          VyOS 1.3-rolling-202010190146


vyos@r4-roll# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.14/24                 u/u  
eth1             -                                 u/u  Lan
eth1.10          10.0.1.254/24                     u/u  
eth1.20          10.0.2.254/24                     u/u  
lo               127.0.0.1/8                       u/u

Add vrrp (eth1.30) doesnt exists

set high-availability vrrp group GRP01 interface 'eth1.10'
set high-availability vrrp group GRP01 no-preempt
set high-availability vrrp group GRP01 virtual-address '10.0.1.1/24'
set high-availability vrrp group GRP01 vrid '10'

set high-availability vrrp group GRP02 interface 'eth1.20'
set high-availability vrrp group GRP02 no-preempt
set high-availability vrrp group GRP02 virtual-address '10.0.2.1/24'
set high-availability vrrp group GRP02 vrid '20'

set high-availability vrrp group GRP03 interface 'eth1.30'
set high-availability vrrp group GRP03 no-preempt
set high-availability vrrp group GRP03 virtual-address '10.0.3.1/24'
set high-availability vrrp group GRP03 vrid '30'
commit

Check vrrp status

vyos@r4-roll# commit
[edit]
vyos@r4-roll# run show vrrp 
Name    Interface      VRID  State      Priority  Last Transition
------  -----------  ------  -------  ----------  -----------------
GRP01   eth1.10          10  MASTER          100  35s
GRP02   eth1.20          20  MASTER          100  35s
GRP03   eth1.30          30  FAULT           100  39s
[edit]
vyos@r4-roll#