Page MenuHomeVyOS Platform

show interfaces throws error
Closed, ResolvedPublicBUG

Description

show interfaces command shows the following error. This is followed by correct data for all interfaces.

$ show interfaces
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 313, in <module>
    args.vrrp
  File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 48, in handled_function
    function(*args, **kwargs)
  File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 222, in run_show_intf_brief
    for interface in filtered_interfaces(ifnames, iftypes, vif, vrrp):
  File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 77, in filtered_interfaces
    interface = klass(ifname, create=False, debug=False)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 93, in __init__
    self.iftype = kargs['encapsulation']
KeyError: 'encapsulation'
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202103011828
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Additional info: it seems not to show any tunnel interfaces.

Viacheslav changed the task status from Open to Confirmed.Mar 2 2021, 11:59 AM
Viacheslav triaged this task as High priority.
Viacheslav changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).

To reproduce, add one tunnel

set interfaces tunnel tun1 address '10.20.30.1/30'
set interfaces tunnel tun1 encapsulation 'gre'
set interfaces tunnel tun1 source-address  '192.168.122.111'
set interfaces tunnel tun1 multicast 'disable'
set interfaces tunnel tun1 remote-ip '192.168.122.12'

PR https://github.com/vyos/vyos-1x/pull/757

vyos@r-roll01:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.11/24                 u/u  
eth1             -                                 u/u  
eth1.1000        -                                 u/u  
eth2             -                                 u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
tun1             10.20.30.1/30                     u/u
Viacheslav changed the task status from Confirmed to Needs testing.Mar 2 2021, 4:04 PM

@FileGo will be fixed in the next rolling release.

Viacheslav claimed this task.