Page MenuHomeVyOS Platform

Traceback on a non-existent interface.
Closed, ResolvedPublicBUG

Description

If the network interface is not presented in the system, then too large code Traceback.
To reproduce.

[email protected]# set interfaces ethernet eth3 description test
[edit]
[email protected]# commit
[ interfaces ethernet eth3 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 449, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 315, in apply
    e = EthernetIf(eth['intf'])
  File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 1051, in __init__
    super().__init__(ifname)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 941, in __init__
    super().__init__(ifname, type)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 88, in __init__
    raise Exception('interface "{}" not found'.format(self._ifname))
Exception: interface "eth3" not found

[[interfaces ethernet eth3]] failed
Commit failed
[edit]
[email protected]#

It will be enough:

interface "eth3" not found

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.3-rolling-201912261106
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav claimed this task.

Fixed in latest rolling

sever@r11-ansible# set interfaces ethernet eth3 description test
[edit]
sever@r11-ansible# commit
[ interfaces ethernet eth3 ]
Interface ethernet eth3 does not exist

[[interfaces ethernet eth3]] failed
Commit failed
[edit]
sever@r11-ansible# 


VyOS 1.3-rolling-202004210117
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:01 PM