Page MenuHomeVyOS Platform

Cannot create new VTI interface
Closed, ResolvedPublic

Description

I can't generate a VTI interface on the latest nightly (1.4-rolling-202106011750).

vyos@vyos# set interfaces vti vti0 address 192.168.2.249/30
[edit]
vyos@vyos# commit
[ interfaces vti vti0 ]
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):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community 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-06-02 11:02:58
Image Version:    VyOS 1.4-rolling-202106011750
Release Train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Wed 02 Jun 2021 01:17 UTC
Build UUID:       1707d047-a33a-41f6-aebb-d4d01d3d848a
Build Commit ID:  9a572897c12a4a

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

Hardware vendor:  innotek GmbH
Hardware model:   VirtualBox
Hardware S/N:     0
Hardware UUID:    7e1ab7cd-7b0d-2140-b5f5-b68d5c74d723

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-vti.py", line 83, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-vti.py", line 73, in apply
    tmp = VTIIf(**vti)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 264, in __init__
    self._create()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/vti.py", line 53, in _create
    self._cmd(cmd.format(**self.config))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip link add vti0 type vti
returned: 
exit code: 2

noteworthy:
cmd 'ip link add vti0 type vti'
returned (out):

returned (err):
RTNETLINK answers: File exists

[[interfaces vti vti0]] failed
Commit failed
[edit]

Which boils down to this:

$ sudo ip link add vti0 type vti
RTNETLINK answers: File exists
$ sudo ip link show vti0
Device "vti0" does not exist.
$ sudo ip link
[...]
4: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
$ sudo ip link delete ip_vti0
$ sudo ip link show ip_vti0
4: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202106011750
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

It seems after that commit
but it is not a root case

In the LTS

root@r2-lts:/home/vyos# ip link add name vti55 type vti 
RTNETLINK answers: File exists

In LTS it doesn't create a tunnel interface if it not present in ipsec configuration

vyos@r2-lts# set interfaces vti vti23 address 10.55.0.2/30
[edit]
vyos@r2-lts# commit
[ interfaces vti vti23 ]
Warning: Interface vti23 is not referenced in vpn configuration.

[edit]
vyos@r2-lts# compare 
No changes between working and active configurations
[edit]
vyos@r2-lts# sudo ip -d tunnel show
ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0
vti1: ip/ip remote 192.0.2.1 local 192.0.2.2 ttl inherit nopmtudisc key 9437185
vti2: ip/ip remote 203.0.113.1 local 203.0.113.2 ttl inherit nopmtudisc key 9437186
c-po changed the task status from Open to Confirmed.Jun 3 2021, 7:38 AM
c-po claimed this task.