Comment 3 for bug 2024481

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote (last edit ):

Well, the prefix you are talking about is for a floating ip (the /32) one. The one that's missing and causing the func test to fail is for the tenant network subnet 192.168.0.0/24:

2023-06-19 00:09:58.409988 | focal-medium | 2023-06-19 00:09:58 [INFO] AssertionError: CIDR, 192.168.0.0/24, not found in BGP peer's routing table: Codes: K - kernel route, C - connected, S - static, R - RIP,

vs 100.64.0.172/32 that is present but is causing is as you point out:

2023-06-19 00:09:46.067 26428 ERROR bgpspeaker.peer [-] AS_PATH on UPDATE message has loops. Ignoring this message: BGPUpdate(len=53,nlri=[BGPNLRI(addr='100.64.0.172',length=32)],path_attributes=[BGPPathAttributeOrigin(flags=64,length=1,type=1,value=0), BGPPathAttributeAsPath(flags=80,length=10,type=2,value=[[4279238721, 4279238701]]), BGPPathAttributeNextHop(flags=64,length=4,type=3,value='172.16.0.66')],total_path_attribute_len=25,type=2,withdrawn_routes=[],withdrawn_routes_len=0)

I agree this error should be fixed by adjusting the peer config but I still think the error above it is what's causing the lack of a /24 route advertisement:

 2023-06-19 00:03:21.766 26428 ERROR neutron_dynamic_routing.services.bgp.agent.bgp_dragent [None req-f082fe6d-cb70-4761-b02d-19f38bda7ae2 - - - - - -] Call to driver for BGP Speaker 04d9b59c-e4b9-4756-92b3-df364fa7bd0d advertise_route has failed with exception BGP Speaker for local_as=4279238701 with router_id=172.16.0.46 not added yet..: neutron_dynamic_routing.services.bgp.agent.driver.exceptions.BgpSpeakerNotAdded: BGP Speaker for local_as=4279238701 with router_id=172.16.0.46 not added yet.

In the func test we retry with tenacity several times checking if the tenant network subnet is present at the other side whereas neutron-bgp-agent doesn't even attempt to advertise it in this case while a floating IP is created after networks are added to the speaker.

So the sequence of events is:

1) neutron-bgp-agent restart
2) bgp speaker gets added to the DB
3) external and tenant networks get added to the speaker in the DB
4) the advertise_route error happens
5) a peer is added to the BGP speaker
6) a floating IP gets created
7) a floating IP gets advertised
8) the test loops with tenacity to assess the advertised routes