Hello,
when my ansible playbook writes a new configuration with order changes in tunnel naming vyos cant apply them properly because It does not resolve the dependencies/arrangement correctly.
As you can see, it attempts to exchange the remote IP of two tunnels simultaneously, which VYOS cannot handle. the problem is that it does not take into account that you cant have 2x tunnel interfaces with same remote and source combination at the same time, even for quick time. for types gre/gretap…
vyos@vyos# comp
[interfaces tunnel]
+ tun669001 {
+ encapsulation "gretap"
+ mtu "1462"
+ remote "66.66.66.1"
+ source-address "1.1.1.1"
+ }
+ tun669002 {
+ encapsulation "gretap"
+ mtu "1462"
+ remote "66.66.66.2"
+ source-address "1.1.1.1"
+ }
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# set interfaces tunnel tun669001 remote '66.66.66.2'
[edit]
vyos@vyos# set interfaces tunnel tun669002 remote '66.66.66.1'
[edit]
vyos@vyos# commit
[ interfaces tunnel tun669001 ]
Traceback (most recent call last):
File "/usr/libexec/vyos/services/vyos-configd", line 144, in run_script
script.apply(c)
File "/usr/libexec/vyos//conf_mode/interfaces_tunnel.py", line 217, in apply
tun = TunnelIf(**tunnel)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 103, in __init__
super().__init__(ifname, **kargs)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 349, in __init__
self._create()
File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 128, in _create
self._cmd(cmd.format(**self.config))
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 64, in _cmd
return cmd(command, self.debug, env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd
raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip link add name tun669001 type gretap local 1.1.1.1 remote 66.66.66.2 tos inherit ttl 64
returned:
exit code: 2
[[interfaces tunnel tun669001]] failed
Commit failed
[edit]
its a bit annoying. i can with some effort write some sort of workaround, but i think this isnt a solution. i think vyos should handle such cases, correct me if im wrong, but thats what this is all for, right?
i confirmed this issue in latest rolling Version: VyOS 2026.01.24-0021-rolling.
and also in 2025-Q2 Stream.
Thanks!