The below error is received when the openvpn tunnel is in unknown state and need to make any changes i.e set/delete related to the tunnel and it says that the tunnel doesn't exist. Making changes should not depend on the tunnel status.
As a workaround, I stopped the openvpn service and then I was able to commit the changes.
vyos@vyos# run show interfaces openvpn detail
vtun10: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/none
inet 10.10.0.1/24 scope global vtun10
valid_lft forever preferred_lft forever
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collisions
152 2 0 0 0 0
[edit]
vyos@vyos# comp
[edit interfaces openvpn vtun10 server]
+client gmillet_external {
+}
[edit]
vyos@vyos# sudo ip -json -detail link list dev vtun10
[{"ifindex":7,"ifname":"vtun10","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":500,"link_type":"none","promiscuity":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"tun","info_data":{"type":"tun","pi":false,"vnet_hdr":false,"multi_queue":false,"persist":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535}]
vyos@vyos# commit
[ interfaces openvpn vtun10 ]
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):
- Contact us using the online help desk if you have a subscription:
https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
https://forum.vyos.io
- Join us 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: 2022-11-30 11:13:06
Image version: VyOS 1.3.2
Release train: equuleus
Built by: Sentrium S.L.
Built on: Mon 05 Sep 2022 09:23 UTC
Build UUID: 1ceaab3a-4f4e-4692-b551-7c05e1da0a77
Build commit ID: 7ce86511888635
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Hardware vendor: QEMU
Hardware model: Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID: 942ffd0e-8357-455f-878a-7bf236819378
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-openvpn.py", line 546, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-openvpn.py", line 536, in apply
o.update(openvpn)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1269, in update
self.set_alias(config.get('description', ''))
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 787, in set_alias
tmp = self.get_interface('alias')
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 176, in get_interface
return self._get_command(self.config, name)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 59, in _get_command
return self._command_get[name].get('format', lambda _: _)(self._cmd(cmd))
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 -json -detail link list dev vtun10
returned:
exit code: 1
noteworthy:
cmd 'ip -json -detail link list dev vtun10'
returned (out):
returned (err):
Device "vtun10" does not exist.
[[interfaces openvpn vtun10]] failed
Commit failed
Workaround:
vyos@vyos# sudo systemctl stop openvpn.service
[edit]
vyos@vyos# comp
[edit interfaces openvpn vtun10 server]
+client gmillet_external {
+}
[edit]
vyos@vyos# commit