Page MenuHomeVyOS Platform

VRRP does not display info when group disabled
Closed, ResolvedPublicBUG

Description

Reproducing steps:

set high-availability vrrp group Foo disable
set high-availability vrrp group Foo interface 'eth0'
set high-availability vrrp group Foo virtual-address '192.168.255.200/24'
set high-availability vrrp group Foo vrid '10'

and output

vyos@R3# run show vrrp 
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below
Report Time:      2020-05-21 08:02:31
Image Version:    VyOS 1.3-rolling-202005210117
Release Train:    equuleus

Built by:         [email protected]
Built on:         Thu 21 May 2020 01:17 UTC
Build UUID:       8751e260-9608-43ec-9acf-acacf7dfc4b5
Build Commit ID:  79bb02aa4203a2

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:     
Hardware UUID:    10f2775e-c786-42df-ba94-f5ca54781984

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/vrrp.py", line 98, in collect
    return util.read_file(fname)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 215, in read_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 209, in read_file
    with open(fname, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/keepalived.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/vrrp.py", line 44, in <module>
    print(VRRP.format(VRRP.collect('json')))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/vrrp.py", line 101, in collect
    raise VRRPError(f'VRRP {name} is not available')
vyos.ifconfig.vrrp.VRRPError: VRRP data is not available

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202005210117
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Unknown Object (User) created this task.May 21 2020, 8:06 AM
dmbaturin claimed this task.
dmbaturin added a subscriber: dmbaturin.

Ideally we may want to add an extended "if VRRP configured" check, or make keepalived produce an empty (or special) file when it's running but has no data. For now this fix should do though.

dmbaturin changed Why the issue appeared? from Will be filled on close to Implementation mistake.Jun 25 2020, 6:25 AM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 6:06 AM
erkin removed a subscriber: Active contributors.