Commit failed ... after deleting vif-c !?!?

I receive a COMMIT FAILED when committing … I just wonder why …

Interface eth5 … configured this way

[edit interfaces ethernet eth5]
vyos@VYOS# show |commands
set disable-flow-control
set duplex ‘full’
set hw-id ‘33:44:55:66:77:88’
set mtu ‘9192’
set speed ‘10000’
set vif-s 100 mtu ‘9192’
set vif-s 100 protocol ‘802.1q’
set vif-s 100 vif-c 3996
set vif-s 100 vif-c 3997
set vif-s 100 vif-c 3998
set vif-s 100 vif-c 3999
set vif-s 201 mtu ‘9192’
set vif-s 201 protocol ‘802.1q’
set vif-s 201 vif-c 3980
set vif-s 201 vif-c 3981
set vif-s 201 vif-c 3982
set vif-s 201 vif-c 3983
set vif-s 201 vif-c 3984
set vif-s 201 vif-c 3985
set vif-s 201 vif-c 3986
set vif-s 201 vif-c 3988
set vif-s 201 vif-c 3989
set vif-s 201 vif-c 3992
set vif-s 201 vif-c 3993
set vif-s 201 vif-c 3994
set vif-s 201 vif-c 3995
set vif-s 201 vif-c 3996
set vif-s 201 vif-c 3998
set vif-s 201 vif-c 3999
set vif-s 203 mtu ‘9192’
set vif-s 203 protocol ‘802.1q’
set vif-s 203 vif-c 3900
set vif-s 203 vif-c 3901
set vif-s 203 vif-c 3902
set vif-s 203 vif-c 3903
set vif-s 203 vif-c 3904
set vif-s 203 vif-c 3905
… etc. etc.

I need to delete all vif-c items of the vif-s 201 so , just before committing I have this “show” result

vif-s 201 {

  • vif-c 3980 {
  • }
  • vif-c 3981 {
  • }
  • vif-c 3982 {
  • }
  • vif-c 3983 {
  • }
  • vif-c 3984 {
  • }
  • vif-c 3985 {
  • }
  • vif-c 3986 {
  • }
  • vif-c 3988 {
  • }
  • vif-c 3989 {
  • }
  • vif-c 3992 {
  • }
  • vif-c 3993 {
  • }
  • vif-c 3994 {
  • }
  • vif-c 3995 {
  • }
  • vif-c 3996 {
  • }
  • vif-c 3998 {
  • }
  • vif-c 3999 {
  • }
    }

but … if I do “commit” … FAIL !
With this long error

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):

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: 2023-05-04 14:48:31
Image version: VyOS 1.3.2
Release train: equuleus

Built by: derago@gmail.com
Built on: Mon 19 Sep 2022 08:13 UTC
Build UUID: de150757-9a82-4634-a288-a3ae2f261827
Build commit ID: 3fda91501f31b8

Architecture: x86_64
Boot via: installed image
System type: bare metal

Hardware vendor: HP
Hardware model: ProLiant DL360e Gen8

Traceback (most recent call last):
File “/usr/libexec/vyos/conf_mode/interfaces-ethernet.py”, line 165, in
apply(c)
File “/usr/libexec/vyos/conf_mode/interfaces-ethernet.py”, line 154, in apply
e.update(ethernet)
File “/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py”, line 357, in update
super().update(config)
File “/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py”, line 1470, in update
VLANIf(vif_c_ifname).remove()
File “/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py”, line 318, in init
self._create()
File “/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py”, line 1560, in _create
self._cmd(cmd.format(**self.config))
KeyError: ‘source_interface’

[[interfaces ethernet eth5]] failed
Commit failed
Archiving config…
ftp://172.20.21.84/Junos [edit interfaces ethernet eth5 vif-s 201]
a.montano@VYOS-BT-1# discard

Changes have been discarded

Can anyone figure out where the problem is?

Thank you for reporting the issue. Could you please provide more details on how to reproduce this exactly? Attempted to reproduce the issue in a quick lab but was unable to do so.

vyos@vyos# 
[edit interfaces ethernet eth4 vif-s 201]
vyos@vyos# show
 mtu 1500
 protocol 802.1q
 vif-c 3980 {
 }
 vif-c 3981 {
 }
 vif-c 3982 {
 }
 vif-c 3983 {
 }
 vif-c 3984 {
 }
 vif-c 3985 {
 }
 vif-c 3986 {
 }
 vif-c 3988 {
 }
 vif-c 3989 {
 }
 vif-c 3992 {
 }
 vif-c 3993 {
 }
 vif-c 3994 {
 }
 vif-c 3995 {
 }
 vif-c 3996 {
 }
 vif-c 3998 {
 }
 vif-c 3999 {
 }
[edit interfaces ethernet eth4 vif-s 201]
vyos@vyos# delete vif-c 
[edit interfaces ethernet eth4 vif-s 201]
vyos@vyos# commit
[edit interfaces ethernet eth4 vif-s 201]
vyos@vyos# compare 1
[edit interfaces ethernet eth4 vif-s 201]
-vif-c 3980 {
-}
-vif-c 3981 {
-}
-vif-c 3982 {
-}
-vif-c 3983 {
-}
-vif-c 3984 {
-}
-vif-c 3985 {
-}
-vif-c 3986 {
-}
-vif-c 3988 {
-}
-vif-c 3989 {
-}
-vif-c 3992 {
-}
-vif-c 3993 {
-}
-vif-c 3994 {
-}
-vif-c 3995 {
-}
-vif-c 3996 {
-}
-vif-c 3998 {
-}
-vif-c 3999 {
-}

it’s a random issue

I have eth5 with 10 vif-s and each one with 1000 vif-c 3000-3999, with QinQ 802.1q, with pppoe-server on eth5 with vlan-range 3000-3999

it worked for weeks, and I could add or delete vif-s and vif-c without any problem
yesterday, suddenly, the commit failed … I could change anything but vif-c , any add/replace of any vif-c produced a COMMIT FAILED

so, I had to reboot the server, and now I can do changes to any vif-c without fails

You can cherry-pick this fix on your machine befroe it will be merge and in the next LTS version

Please issue systemctl reload vyos-configd after adding that content

@c-po
there could be a problem … in my 1.3.2 LTS there is no conf_mode/container.py at all

Should I upgrade LTS in some way ? It’s a production environment.

You actually only need this one commit vyos.ifconfig: T2104: support adding and removing VLANs in one call. · vyos/vyos-1x@c71a97f · GitHub

VyOS 1.3.3 is on the way of early testing before official release. It will also add container support, hence the commit.

@c-po perfect, thanks.