Bug 2186535

Summary: withdrawing a LB VIP IP not done immediately
Product: Red Hat OpenStack Reporter: Eduardo Olivares <eolivare>
Component: ovn-bgp-agentAssignee: Luis Tomas Bolivar <ltomasbo>
Status: CLOSED ERRATA QA Contact: Eduardo Olivares <eolivare>
Severity: high Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: dalvarez, lmartins, ltomasbo
Target Milestone: gaKeywords: Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn-bgp-agent-0.4.1-1.20230512001004.e697e35.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 01:14:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eduardo Olivares 2023-04-13 16:29:11 UTC
Description of problem:
During the verification of BZ2176175, this bug was found.
When the LB is created and configured to redirect its traffic to a certain internal IP, the LB VIP is immediately exposed.
However, when the LB is deleted, the route to its VIP is not withdrawed immediately.
It is withdrawed some time later (due to this the severity of this bug is low).
The LB is deleted using this command:
openstack loadbalancer delete --cascade provider-ovn-lbs


The ovn-bgp-agent shows the following logs when the LB is created and attached to an internal port:
2023-04-13T16:19:06.793920540+00:00 stdout F 2023-04-13 16:19:06.792 1010779 DEBUG ovsdbapp.backend.ovs_idl.event [-] Matched CREATE: OVNLBMemberCreateDeleteEvent(events=('create', 'delete'), table='Load_Balancer', conditions=None, old_conditions=None) to row=Load_Balancer(external_ids={'lb_id': 'e512c26d-03d2-4ade-b74c-ce2c23e7007a'}, name=bfee8f40-1707-4fd9-a67a-3357904430f6, datapaths=[], vips={'172.24.100.221:80': '20.0.0.100:80'}, datapath_group=[<ovs.db.idl.Row object at 0x7fc7ec0ad7f0>], options={'hairpin_orig_tuple': 'true'}, protocol=['tcp']) old= matches /usr/lib/python3.9/site-packages/ovsdbapp/backend/ovs_idl/event.py:43ESC[00m
2023-04-13T16:19:06.799785761+00:00 stdout F 2023-04-13 16:19:06.799 1010779 DEBUG oslo_concurrency.lockutils [-] Lock "bgp" acquired by "ovn_bgp_agent.drivers.openstack.ovn_bgp_driver.OVNBGPDriver.expose_ovn_lb_on_provider" :: waited 0.000s inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:355ESC[00m
2023-04-13T16:19:06.799969472+00:00 stdout F 2023-04-13 16:19:06.799 1010779 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Adding BGP route for loadbalancer VIP 172.24.100.221 _expose_ovn_lb_on_provider /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py:450ESC[00m
...
2023-04-13T16:19:07.381341821+00:00 stdout F 2023-04-13 16:19:07.381 1010779 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Added BGP route for loadbalancer VIP 172.24.100.221 _expose_ovn_lb_on_provider /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py:465ESC[00m



However, when the LB is deleted, an event is matched, but there is no log about the withdrawal of that IP:
2023-04-13T16:19:31.614474379+00:00 stdout F 2023-04-13 16:19:31.614 1010779 DEBUG ovsdbapp.backend.ovs_idl.event [-] Matched DELETE: OVNLBMemberCreateDeleteEvent(events=('create', 'delete'), table='Load_Balancer', conditions=None, old_conditions=None) to row=Load_Balancer(external_ids={'lb_id': 'e512c26d-03d2-4ade-b74c-ce2c23e7007a'}, name=bfee8f40-1707-4fd9-a67a-3357904430f6, datapaths=[], vips={'172.24.100.221:80': '20.0.0.100:80'}, datapath_group=[], options={'hairpin_orig_tuple': 'true'}, protocol=['tcp']) old= matches /usr/lib/python3.9/site-packages/ovsdbapp/backend/ovs_idl/event.py:43ESC[00m





Version-Release number of selected component (if applicable):
RHOS-17.1-RHEL-9-20230404.n.1 / ovn-bgp-agent-0.3.1-1.20230324161202.ddb740e.el9ost

How reproducible:
100%

Comment 16 errata-xmlrpc 2023-08-16 01:14:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:4577