vyOS 1.4 - Unable to apply routing changes when "protocols mpls interface 'xxx'" applied

When the command ''set protocols mpls interface ‘xxx’" is configured and committed, it is applied correctly. Any subsequent commands committed in later commits then error out with.

...
Report time:      2022-11-24 16:45:15
Image version:    VyOS 1.4-rolling-202211180318
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Fri 18 Nov 2022 03:18 UTC
Build UUID:       7d903365-be97-4d56-865b-ca8560ae24aa
Build commit ID:  594c99e012fd66

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 08 c5 33 c1 d3 56 f5-83 1f 28 c4 b5 49 4d bc
Hardware UUID:    33c50842-d3c1-f556-831f-28c4b5494dbc

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 388, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 367, in apply
    frr_cfg.commit_configuration(zebra_daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 480, in commit_configuration
    raise ConfigurationNotValid(f'Config commit retry counter ({count_max}) exceeded')
vyos.frr.ConfigurationNotValid: Config commit retry counter (5) exceeded

The “workaround” is:

  1. delete the line delete protocols mpls interface 'xxx'
  2. commit
  3. then add the required configuration
  4. commit
  5. add the line set protocols mpls interface 'xxx'
  6. commit

It seems a mismatch between what FRR is reporting back as the current configuration and vyOS using that same configuration to “reapply” with the merged new commits.

Full debug output, enabling FRR debugging shows…

vyos@vyos-99# set protocols bgp parameters router-id '10.180.3.1'
[edit]
vyos@vyos-99# commit
load_configuration: Configuration loaded from FRR daemon zebra
load_configuration:  loaded      0 !
load_configuration:  loaded      1 frr version 8.4
load_configuration:  loaded      2 frr defaults traditional
load_configuration:  loaded      3 hostname debian
load_configuration:  loaded      4 log syslog
load_configuration:  loaded      5 log facility local7
load_configuration:  loaded      6 hostname vyos-99
load_configuration:  loaded      7 service integrated-vtysh-config
load_configuration:  loaded      8 !
load_configuration:  loaded      9 interface eth3
load_configuration:  loaded     10  mpls
load_configuration:  loaded     11 exit
load_configuration:  loaded     12 !
load_configuration:  loaded     13 end
modify_section: starting search for '(\\s+)?ip protocol bgp route-map [-a-zA-Z0-9.]+' until '(\\s|!)'
_find_first_block: find start='(\\s+)?ip protocol bgp route-map [-a-zA-Z0-9.]+$' stop='(\\s|!)' start_at=0
_find_first_block: no match       0 "!"
_find_first_block: no match       1 "frr version 8.4"
_find_first_block: no match       2 "frr defaults traditional"
_find_first_block: no match       3 "hostname debian"
_find_first_block: no match       4 "log syslog"
_find_first_block: no match       5 "log facility local7"
_find_first_block: no match       6 "hostname vyos-99"
_find_first_block: no match       7 "service integrated-vtysh-config"
_find_first_block: no match       8 "!"
_find_first_block: no match       9 "interface eth3"
_find_first_block: no match      10 " mpls"
_find_first_block: no match      11 "exit"
_find_first_block: no match      12 "!"
_find_first_block: no match      13 "end"
_find_first_block: exit start={repr(start_pattern)} stop={repr(stop_pattern)} start_at={start_at}
modify_section: No more config sections found, exiting
_find_first_element: find start="(ip prefix-list .*|route-map .*|line vty|end)" start_at=0
_find_first_element: no match     0 "!"
_find_first_element: no match     1 "frr version 8.4"
_find_first_element: no match     2 "frr defaults traditional"
_find_first_element: no match     3 "hostname debian"
_find_first_element: no match     4 "log syslog"
_find_first_element: no match     5 "log facility local7"
_find_first_element: no match     6 "hostname vyos-99"
_find_first_element: no match     7 "service integrated-vtysh-config"
_find_first_element: no match     8 "!"
_find_first_element: no match     9 "interface eth3"
_find_first_element: no match    10 " mpls"
_find_first_element: no match    11 "exit"
_find_first_element: no match    12 "!"
_find_first_element: Found stop  13 "end"
add_before:   add           13 !
add_before:   add           14 !
commit_configuration:  Commiting configuration
commit_configuration: new_config   0 !
commit_configuration: new_config   1 frr version 8.4
commit_configuration: new_config   2 frr defaults traditional
commit_configuration: new_config   3 hostname debian
commit_configuration: new_config   4 log syslog
commit_configuration: new_config   5 log facility local7
commit_configuration: new_config   6 hostname vyos-99
commit_configuration: new_config   7 service integrated-vtysh-config
commit_configuration: new_config   8 !
commit_configuration: new_config   9 interface eth3
commit_configuration: new_config  10  mpls
commit_configuration: new_config  11 exit
commit_configuration: new_config  12 !
commit_configuration: new_config  13 !
commit_configuration: new_config  14 !
commit_configuration: new_config  15 end
reload_configuration: Reloading config using temporary file: /tmp/tmpk1cye_h_
reload_configuration: Executing command against frr-reload: "/usr/lib/frr/frr-reload.py --reload --daemon zebra --debug --stdout /tmp/tmpk1cye_h_"
frr-reload output:   0 2022-11-24 18:14:06,439  INFO: Called via "Namespace(input=None, reload=True, test=False, debug=True, log_level='info', stdout=True, pathspace=None, filename='/tmp/tmpk1cye_h_', overwrite=False, bindir='/usr/bin', confdir='/etc/frr', rundir='/var/run/frr', vty_socket=None, daemon='zebra', test_reset=False)"
frr-reload output:   1 2022-11-24 18:14:06,439  INFO: Loading Config object from file /tmp/tmpk1cye_h_
frr-reload output:   2 2022-11-24 18:14:06,551   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   3 b'line 11: % Command incomplete:  mpls\n\n'
reload_configuration: Reloading config using temporary file: /tmp/tmp05w2fw42
reload_configuration: Executing command against frr-reload: "/usr/lib/frr/frr-reload.py --reload --daemon zebra --debug --stdout /tmp/tmp05w2fw42"
frr-reload output:   0 2022-11-24 18:14:06,841  INFO: Called via "Namespace(input=None, reload=True, test=False, debug=True, log_level='info', stdout=True, pathspace=None, filename='/tmp/tmp05w2fw42', overwrite=False, bindir='/usr/bin', confdir='/etc/frr', rundir='/var/run/frr', vty_socket=None, daemon='zebra', test_reset=False)"
frr-reload output:   1 2022-11-24 18:14:06,841  INFO: Loading Config object from file /tmp/tmp05w2fw42
frr-reload output:   2 2022-11-24 18:14:06,946   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   3 b'line 11: % Command incomplete:  mpls\n\n'
reload_configuration: Reloading config using temporary file: /tmp/tmpk6lz2wuz
reload_configuration: Executing command against frr-reload: "/usr/lib/frr/frr-reload.py --reload --daemon zebra --debug --stdout /tmp/tmpk6lz2wuz"
frr-reload output:   0 2022-11-24 18:14:07,228  INFO: Called via "Namespace(input=None, reload=True, test=False, debug=True, log_level='info', stdout=True, pathspace=None, filename='/tmp/tmpk6lz2wuz', overwrite=False, bindir='/usr/bin', confdir='/etc/frr', rundir='/var/run/frr', vty_socket=None, daemon='zebra', test_reset=False)"
frr-reload output:   1 2022-11-24 18:14:07,228  INFO: Loading Config object from file /tmp/tmpk6lz2wuz
frr-reload output:   2 2022-11-24 18:14:07,340   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   3 b'line 11: % Command incomplete:  mpls\n\n'
reload_configuration: Reloading config using temporary file: /tmp/tmpmf197xmg
reload_configuration: Executing command against frr-reload: "/usr/lib/frr/frr-reload.py --reload --daemon zebra --debug --stdout /tmp/tmpmf197xmg"
frr-reload output:   0 2022-11-24 18:14:07,628  INFO: Called via "Namespace(input=None, reload=True, test=False, debug=True, log_level='info', stdout=True, pathspace=None, filename='/tmp/tmpmf197xmg', overwrite=False, bindir='/usr/bin', confdir='/etc/frr', rundir='/var/run/frr', vty_socket=None, daemon='zebra', test_reset=False)"
frr-reload output:   1 2022-11-24 18:14:07,628  INFO: Loading Config object from file /tmp/tmpmf197xmg
frr-reload output:   2 2022-11-24 18:14:07,735   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   3 b'line 11: % Command incomplete:  mpls\n\n'
reload_configuration: Reloading config using temporary file: /tmp/tmpafj1rsf5
reload_configuration: Executing command against frr-reload: "/usr/lib/frr/frr-reload.py --reload --daemon zebra --debug --stdout /tmp/tmpafj1rsf5"
frr-reload output:   0 2022-11-24 18:14:08,016  INFO: Called via "Namespace(input=None, reload=True, test=False, debug=True, log_level='info', stdout=True, pathspace=None, filename='/tmp/tmpafj1rsf5', overwrite=False, bindir='/usr/bin', confdir='/etc/frr', rundir='/var/run/frr', vty_socket=None, daemon='zebra', test_reset=False)"
frr-reload output:   1 2022-11-24 18:14:08,016  INFO: Loading Config object from file /tmp/tmpafj1rsf5
frr-reload output:   2 2022-11-24 18:14:08,123   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   3 b'line 11: % Command incomplete:  mpls\n\n'

I also have found that there is an issue with rebooting a saved config that contains the same command, which causes sections of configuration not to be applied on boot.

A saved version of the boot file (/config/config.boot) with the mpls\interface eth3 entry fails and then the subsequent config is not applied. The broken version of the file (only relevant section shown) follows:

 mpls {
        interface eth3
        ldp {
            discovery {
                transport-ipv4-address 10.255.254.2
            }
            export {
                ipv4 {
                    explicit-null
                }
            }
            interface eth3
            router-id 10.255.254.2
        }
    }
    ospf {
        area 0 {
            network 10.180.3.0/24
            network 10.255.254.2/32
        }
        parameters {
            abr-type cisco
            router-id 10.255.254.2
        }
    }

If I remove the line under mpls interface eth3, save the file then reboot, upon restarting the configuration is applied in full successfully. The good boot file is as follows (only relevant section shown) :


 mpls {
        ldp {
            discovery {
                transport-ipv4-address 10.255.254.2
            }
            export {
                ipv4 {
                    explicit-null
                }
            }
            interface eth3
            router-id 10.255.254.2
        }
    }
    ospf {
        area 0 {
            network 10.180.3.0/24
            network 10.255.254.2/32
        }
        parameters {
            abr-type cisco
            router-id 10.255.254.2
        }
    }

After a reboot the config is applied in full successfully and the ‘running config’ looks like (relevent section only):

 mpls {
        interface eth3
        ldp {
            discovery {
                transport-ipv4-address 10.255.254.2
            }
            export {
                ipv4 {
                    explicit-null
                }
            }
            interface eth3
            router-id 10.255.254.2
        }
    }
    ospf {
        area 0 {
            network 10.180.3.0/24
            network 10.255.254.2/32
        }
        parameters {
            abr-type cisco
            router-id 10.255.254.2
        }
    }

So as the line has been re-entered automatically upon application of the config.boot (which did not contain the line), if I now make a change to the config and save it, when I reboot, I end up in the same broken situation that I will lose configuration as that line is seen as invalid configuration and breaks the rest of the config application process.

I created a bug report T4842
thanks

1 Like