Skip to content

bgpcfgd fails to refresh ip route when remove and add back Loopback0 #11171

Closed
@wen587

Description

@wen587

Description

  1. bgp failed to refresh ip route when Loopback0 is updated. Warning related code https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py#L45-L67
  2. Mannual hack to force the update is to restart bgpd then bgpcfgd service inside bgp container.
    supervisorctl restart bgpd
    supervisorctl restart bgpcfgd

Steps to reproduce the issue:

  1. Record the current IP route for Loopback0(10.1.0.32/32)
admin@vlab-01:~$ ip route s | grep -m 8 "10.1.0.32 "
default nhid 254 proto bgp src 10.1.0.32 metric 20
100.1.0.29 nhid 255 via 10.0.0.57 dev PortChannel101 proto bgp src 10.1.0.32 metric 20
100.1.0.30 nhid 256 via 10.0.0.59 dev PortChannel102 proto bgp src 10.1.0.32 metric 20
100.1.0.31 nhid 257 via 10.0.0.61 dev PortChannel103 proto bgp src 10.1.0.32 metric 20
100.1.0.32 nhid 258 via 10.0.0.63 dev PortChannel104 proto bgp src 10.1.0.32 metric 20
192.168.8.0/25 nhid 254 proto bgp src 10.1.0.32 metric 20
192.168.8.128/25 nhid 254 proto bgp src 10.1.0.32 metric 20
192.168.16.0/25 nhid 254 proto bgp src 10.1.0.32 metric 20
  • Remove Loopback0 then add it back. IP route related to Loopback0 no longer exist.
admin@vlab-01:~$ sudo config loopback del Loopback0
admin@vlab-01:~$ sudo config interface ip add Loopback0 10.1.0.32

admin@vlab-01:~$ ip route s | grep -m 8 "10.1.0.32 "           <====== No route refreshment related to Loopback0
admin@vlab-01:~$
  • Check Syslog regarding bgpcfgd. There are warnings about unsupported update and delete
Jun 17 02:15:25.101094 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'DEL', ())'
Jun 17 02:15:25.102449 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0', 'DEL', ())'
Jun 17 02:15:25.109775 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'DEL', ())'
Jun 17 02:15:25.113381 vlab-01 WARNING bgp#bgpcfgd: Delete command is not supported for 'zebra set src' templates
Jun 17 02:15:25.184370 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0', 'DEL', ())'
Jun 17 02:15:25.184370 vlab-01 WARNING bgp#bgpcfgd: Delete command is not supported for 'zebra set src' templates
Jun 17 02:15:33.547554 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0', 'SET', (('NULL', 'NULL'),))'
Jun 17 02:15:33.555570 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'SET', (('NULL', 'NULL'),))'
Jun 17 02:15:33.576897 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0', 'SET', (('vrf', ''),))'
Jun 17 02:15:33.590854 vlab-01 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'SET', (('state', 'ok'),))'
Jun 17 02:15:33.592352 vlab-01 WARNING bgp#bgpcfgd: Update command is not supported for set src templates. current ip='10.1.0.32'. new ip='10.1.0.32'

Describe the results you received:

IP route missing after adding back Loopback0. Syslog shows warnings of unsupported command.

Describe the results you expected:

bgp should handle the logic of IP route refreshment when update Loopback interface.

Output of show version:

admin@vlab-01:~$ show ver

SONiC Software Version: SONiC.master-10763.96436-aa5cdcc51
Distribution: Debian 11.3
Kernel: 5.10.0-8-2-amd64
Build commit: aa5cdcc51
Build date: Fri May  6 06:25:04 UTC 2022
Built by: AzDevOps@sonic-build-workers-001HFQ

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 02:19:25 up 3 days, 22:13,  2 users,  load average: 0.27, 0.24, 0.20
Date: Fri 17 Jun 2022 02:19:25

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

Metadata

Metadata

Assignees

Labels

Triagedthis issue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions