Page MenuHomeVyOS Platform

Trying to create more than one tunnel of the same type to the same address causes unhandled exception
Open, Requires assessmentPublicBUG

Description

If you create, say, a GRE tunnel between 192.0.2.1 and 203.0.113.1, then try to create another one with the same protocol and endpoints, the commit failure is quite unexpected.

[email protected]# commit
[ interfaces tunnel tun11 ]
VyOS had an issue completing a command.

...

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 195, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 185, in apply
    tun = TunnelIf(**tunnel)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 109, in __init__
    super().__init__(ifname, **kargs)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 318, in __init__
    self._create()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 134, in _create
    self._cmd(cmd.format(**self.config))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 52, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: ip tunnel add tun11 mode ip6gre local 2001:db8:1::1 remote 2001:db8:1::2 tos inherit ttl 64 encaplimit 4 flowlabel inherit hoplimit 64 tclass inherit
returned: 
exit code: 1

noteworthy:
cmd 'ip tunnel add tun11 mode ip6gre local 2001:db8:1::1 remote 2001:db8:1::2 tos inherit ttl 64 encaplimit 4 flowlabel inherit hoplimit 64 tclass inherit'
returned (out):

returned (err):
add tunnel "ip6gre0" failed: No buffer space available

[[interfaces tunnel tun11]] failed
Commit failed
[edit interfaces]

Such configs are certainly invalid, but we need to do something about the error message.

Details

Difficulty level
Unknown (require assessment)
Version
1.3.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)