Page MenuHomeVyOS Platform

Removing vif-c interface raises KeyError
Closed, ResolvedPublicBUG

Description

Reproduce

set interfaces ethernet eth2 vif-s 3500 protocol 802.1q
set interfaces ethernet eth2 vif-s 3500 vif-c 700 address 10.200.5.1/24
commit
delete interfaces ethernet eth2 vif-s 3500 vif-c 700
commit
[ interfaces ethernet eth2 ]
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):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us 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:      2021-11-05 20:32:06
Image version:    VyOS 1.3.0-epa3
Release train:    equuleus

Built by:         Sentrium S.L.
Built on:         Sun 31 Oct 2021 17:38 UTC
Build UUID:       383e45ad-b32a-4359-8183-9baacc8e69d9
Build commit ID:  bb511522cc3bb2-dirty

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 33 79 fe 73 64 2d 62-d5 62 ab 99 5a 3e d9 6d
Hardware UUID:    fe793342-6473-622d-d562-ab995a3ed96d

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 163, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 152, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 340, in update
    super().update(config)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1427, in update
    tmp['protocol'] = vif_s_config['protocol']
KeyError: 'protocol'

noteworthy:
cmd 'ethtool --show-pause eth2'
returned (out):
Pause parameters for eth2:
returned (err):
Cannot get device pause settings: Operation not supported
cmd 'ethtool --show-pause eth2'
returned (out):
Pause parameters for eth2:
returned (err):
Cannot get device pause settings: Operation not supported

[[interfaces ethernet eth2]] failed
Commit failed

Details

Difficulty level
Easy (less than an hour)
Version
1.3.0-epa3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po claimed this task.
c-po triaged this task as Unbreak Now! priority.
c-po created this task.