When BGP container/service is restarted, the CONFIG_DB entries will be pushed to Bgpcfgd for programming into FRR. Bgpcfgd does so by batching a set of commands in a temporary file and run "vtysh -f /tmp/" to push the configuration to FRR.
Recently, we noticed that when there is SRv6 configuration in CONFIG_DB, such an operation failed because FRR complained that "segment-routing" command was not complete.
Example syslog:
2025 Feb 21 23:03:52.127094 vlab-01 DEBUG bgp#bgpcfgd: execute command '['vtysh', '-f', '/tmp/tmp_oxgkoog']'.
2025 Feb 21 23:03:52.196510 vlab-01 ERR bgp#bgpcfgd: command execution returned 2. Command: '['vtysh', '-f', '/tmp/tmp_oxgkoog']', stdout: '[83|mgmtd] sending configuration#012[84|zebra] sending configuration#012[90|bgpd] sending configuration#012Waiting for children to finish applying config...#012[100|staticd] sending configuration#012', stderr: 'line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[84|zebra] Configuration file[/etc/frr/frr.conf] processing failure: 2#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[100|staticd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012[83|mgmtd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[90|bgpd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012'
2025 Feb 21 23:03:52.196510 vlab-01 ERR bgp#bgpcfgd: ConfigMgr::commit(): can't push configuration from file='/tmp/tmp_oxgkoog', rc='2', stdout='[83|mgmtd] sending configuration#012[84|zebra] sending configuration#012[90|bgpd] sending configuration#012Waiting for children to finish applying config...#012[100|staticd] sending configuration#012', stderr='line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[84|zebra] Configuration file[/etc/frr/frr.conf] processing failure: 2#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[100|staticd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012[83|mgmtd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012line 1485: % Command incomplete[30]: segment-routing#012#012line 1486: % Unknown command[30]: srv6#012line 1487: % Unknown command[30]: static-sids#012line 1488: % Unknown command[30]: sid 3000:1:10::/48 locator loc1 behavior uN#012[90|bgpd] Configuration file[/etc/frr/frr.conf] processing failure: 2#012'
2025 Feb 21 23:03:52.196510 vlab-01 CRIT bgp#bgpcfgd: Runner::commit was unsuccessful
Relevant content of the vtysh commands file in the case above:
!
! template: bgpd/templates/msft.general/v4.tor/instance.conf.j2
!
neighbor 10.0.0.57 remote-as 64600
neighbor 10.0.0.57 description ARISTA01T1
neighbor 10.0.0.57 peer-group TIER1_V4
!
address-family ipv4 unicast
neighbor 10.0.0.57 allowas-in 1
exit-address-family
!
!
!
! end of template: bgpd/templates/msft.general/v4.tor/instance.conf.j2
!
!
! end of template: bgpd/templates/general/instance.conf.j2
!
segment-routing
srv6
static-sids
sid 3000:1:10::/48 locator loc1 behavior uN
!
! Set ip source to loopback for bgp learned routes
!
route-map RM_SET_SRC6 permit 10
set src FC00:1::32
!
ipv6 protocol bgp route-map RM_SET_SRC6
!
!
! Set ip source to loopback for bgp learned routes
!
route-map RM_SET_SRC permit 10
set src 10.1.0.32
!
ip protocol bgp route-map RM_SET_SRC
!
When BGP container/service is restarted, the CONFIG_DB entries will be pushed to Bgpcfgd for programming into FRR. Bgpcfgd does so by batching a set of commands in a temporary file and run "vtysh -f /tmp/" to push the configuration to FRR.
Recently, we noticed that when there is SRv6 configuration in CONFIG_DB, such an operation failed because FRR complained that "segment-routing" command was not complete.
Example syslog:
Relevant content of the vtysh commands file in the case above: