When working with l2tp3v3 interfaces and bridge configuration, it's failing when submitting all changes in the same config.
Configuration used to reproduce the issue on a fresh install:
vyos@vyos# compare commands
set interfaces ethernet eth0 address '10.10.10.1/24'
set interfaces loopback lo address '192.168.1.11/32'
set interfaces bridge br0 member interface eth3
set interfaces bridge br0 member interface l2tpeth333
set interfaces l2tpv3 l2tpeth333 encapsulation 'ip'
set interfaces l2tpv3 l2tpeth333 peer-session-id '33'
set interfaces l2tpv3 l2tpeth333 peer-tunnel-id '33'
set interfaces l2tpv3 l2tpeth333 remote '198.51.100.100'
set interfaces l2tpv3 l2tpeth333 session-id '33'
set interfaces l2tpv3 l2tpeth333 source-address '192.168.1.11'
set interfaces l2tpv3 l2tpeth333 tunnel-id '33'
set protocols static route 198.51.100.0/24 next-hop 10.10.10.2
[edit]
vyos@vyos# commit
[ interfaces l2tpv3 l2tpeth333 ]
Traceback (most recent call last):
File "/usr/libexec/vyos/services/vyos-configd", line 157, in run_script
script.apply(c)
File "/usr/libexec/vyos//conf_mode/interfaces_l2tpv3.py", line 106, in apply
l = L2TPv3If(**l2tpv3)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 350, in __init__
self._create()
File "/usr/lib/python3/dist-packages/vyos/ifconfig/l2tpv3.py", line 75, in _create
self._cmd(cmd.format(**self.config))
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 66, in _cmd
return cmd(command, self.debug, env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 174, in cmd
raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip l2tp add session name l2tpeth333 tunnel_id 33 session_id 33 peer_session_id 33
returned:
exit code: 2
[[interfaces l2tpv3 l2tpeth333]] failed
Commit failed
[edit]
vyos@vyos#We need two commits in order to make it work
[edit] vyos@vyos# compare commands set interfaces ethernet eth0 address '10.10.10.1/24' set interfaces loopback lo address '192.168.1.11/32' set interfaces bridge br0 member interface eth3 set interfaces bridge br0 member interface l2tpeth333 set protocols static route 198.51.100.0/24 next-hop 10.10.10.2 [edit] vyos@vyos# commit [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 encapsulation 'ip' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 peer-session-id '33' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 peer-tunnel-id '33' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 remote '198.51.100.100' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 session-id '33' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 source-address '192.168.1.11' [edit] vyos@vyos# set interfaces l2tpv3 l2tpeth333 tunnel-id '33' [edit] vyos@vyos# commit [edit] vyos@vyos#
Also, once stored, the configuration is not loaded properly after reboot:
[ OK ] Finished Record Runlevel Change in UTMP. [ 16.761174] vyos-router[874]: Starting VyOS router. [ 19.249115] vyos-router[874]: Waiting for NICs to settle down: settled in 0sec.. [ 22.255231] vyos-router[874]: Mounting VyOS Config...done. [ 37.508979] vyos-router[874]: migrate system configure. [ 38.483480] vyos-config[880]: Configuration error Welcome to VyOS - vyos ttyS0 vyos login: vyos Password: Welcome to VyOS! ┌── ┐ . VyOS 1.5.0 └ ──┘ circinus * Documentation: https://docs.vyos.io/en/latest * Project news: https://blog.vyos.io * Bug reports: https://vyos.dev You can change this banner using "set system login banner post-login" command. VyOS is a free software distribution that includes multiple components, you can check individual component licenses under /usr/share/doc/*/copyright vyos@vyos:~$ conf WARNING: There was a config error on boot: saving the configuration now could overwrite data. You may want to check and reload the boot config [edit] vyos@vyos# load Loading configuration from 'config.boot' Load complete. Use 'commit' to make changes effective. [edit] vyos@vyos# compare commands ç set interfaces l2tpv3 l2tpeth333 encapsulation 'ip' set interfaces l2tpv3 l2tpeth333 peer-session-id '33' set interfaces l2tpv3 l2tpeth333 peer-tunnel-id '33' set interfaces l2tpv3 l2tpeth333 remote '198.51.100.100' set interfaces l2tpv3 l2tpeth333 session-id '33' set interfaces l2tpv3 l2tpeth333 source-address '192.168.1.11' set interfaces l2tpv3 l2tpeth333 tunnel-id '33' [edit] vyos@vyos# commit [edit] vyos@vyos#
The same configuraiton works properly in Sagitta, with one commit, and no issues found during reboot