Page MenuHomeVyOS Platform

VIF deletion fails inconsistently
Closed, ResolvedPublicBUG

Description

Interface eth1 running-config:

vyos@vyos-appliance:~$ show configuration commands  | grep eth1
set interfaces ethernet eth1 address '192.168.1.120/24'
set interfaces ethernet eth1 description 'Configured by Ansible - Interface 1'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:ad:ef:65'
set interfaces ethernet eth1 mtu '1200'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 100 description 'Eth1 - VIF 100'
set interfaces ethernet eth1 vif 100 mtu '400'

With the above configuration, whenever I run delete interfaces ethernet eth1 vif 100 and commit, it fails with:

[ interfaces ethernet eth1 vif 100 mtu 400 ]
RTNETLINK answers: Numerical result out of range

delete [ interfaces ethernet eth1 vif 100 mtu ] failed
delete [ interfaces ethernet eth1 vif 100 ] failed
Commit failed
[edit]

Reproducible on:

vyos@vyos:~$ show version
Version:          VyOS 1.2.0-rolling+201904210337
Built by:         [email protected]
Built on:         Sun 21 Apr 2019 03:37 UTC
Build ID:         4fcdb2bb-9f16-440b-aecd-574a5165bf3
vyos@vyos-appliance:~$ show version
Version:      VyOS 1.1.8
Description:  VyOS 1.1.8 (helium)
Copyright:    2017 VyOS maintainers and contributors
Built by:     [email protected]
Built on:     Sat Nov 11 13:44:36 UTC 2017
Build ID:     1711111344-b483efc

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.2.0-rolling+201904210337
Why the issue appeared?
Will be filled on close

Event Timeline

hagbard added a subscriber: hagbard.
This comment was removed by hagbard.
hagbard changed the task status from Open to Confirmed.May 6 2019, 4:42 PM

As a work around do either:

'del interfaces ethernet eth1 mtu' or set interfaces ethernet eth1 mtu '1500'.

The reason is that a delete action on the vif could also be a 'del .... mtu' command, which sets at the backend an mtu of 1500 per default. So, no you would have 1200 for the parnet (eth2) and 1500 for the vif (eth2.100) which is not possible and that's what ip complains about. I will introduce a patch which reads the mtu from the parent on a delete action, which should then avoid that issue.

hagbard changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).May 6 2019, 5:44 PM
hagbard changed the task status from Confirmed to Needs testing.May 6 2019, 5:57 PM
syncer triaged this task as Normal priority.May 6 2019, 7:10 PM

successfully tested on:
Version: VyOS 1.2.0-rolling+201905081347
Built by: [email protected]
Built on: Wed 08 May 2019 13:47 UTC
Build ID: 7093c43d-6ea7-45c9-a7c5-3fdf07c0ebc7