Browse Source

Ensure LBaaS state is updated upon SVC deletion

When a SVC is recreated all the LBaaS resources are first deleted,
which requires the LBaaS state obj to be updated accordingly, then
created. Right now, when a LBaaS deletion happens the values for
members, pools and listeners are not updated on the lbaas state obj.

This commit fixes the issue by ensuring the lbaas state object is
updated.

Closes-Bug: 1843142
Change-Id: Ibe72cb3ebd3d2a861684e7e8ac5a310fe8060aa9
tags/1.1.0
Maysa Macedo 1 week ago
parent
commit
4521276f48
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      kuryr_kubernetes/controller/handlers/lbaas.py

+ 3
- 0
kuryr_kubernetes/controller/handlers/lbaas.py View File

@@ -597,6 +597,9 @@ class LoadBalancerHandler(k8s_base.ResourceEventHandler):
597 597
             self._drv_lbaas.release_loadbalancer(
598 598
                 loadbalancer=lb)
599 599
             lb = None
600
+            lbaas_state.pools = []
601
+            lbaas_state.listeners = []
602
+            lbaas_state.members = []
600 603
             changed = True
601 604
 
602 605
         if not lb:

Loading…
Cancel
Save