Bug 1784435 - Ensure leftover load balancers are deleted upon Kuryr-Controller start
Summary: Ensure leftover load balancers are deleted upon Kuryr-Controller start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.4.0
Assignee: Maysa Macedo
QA Contact: Jon Uriarte
URL:
Whiteboard:
Depends On:
Blocks: 1784440
TreeView+ depends on / blocked
 
Reported: 2019-12-17 12:37 UTC by Maysa Macedo
Modified: 2020-05-04 11:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1784440 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:20:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kuryr-kubernetes pull 111 0 None closed bug 1784435: Lbaas deletion 2020-04-20 18:22:28 UTC
Github openshift kuryr-kubernetes pull 132 0 None closed Bug 1784435: Ensure only lb with no corresponding svc is cleaned up 2020-04-20 18:22:28 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:20:58 UTC

Description Maysa Macedo 2019-12-17 12:37:04 UTC
Description of problem:

When the deletion of a service is triggered and the load balancer is still being provisioned, if the Kuryr-controller restarts, the deletion
event will be gone and the load balancer remains on the cluster with no associated service.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Jon Uriarte 2019-12-24 12:57:50 UTC
Failed QA in 4.4.0-0.nightly-2019-12-20-210709 on 2019-12-13.1 OSP 13 puddle.

1. Create project, pod and service
 $ oc new-project test
 $ oc run --image kuryr/demo pod1
 $ oc expose dc/pod1 --port 80 --target-port 8080

 $ oc get pods
 NAME            READY   STATUS      RESTARTS   AGE
 pod1-1-deploy   0/1     Completed   0          88s
 pod1-1-vgw8n    1/1     Running     0          53s

 $ oc get svc
 NAME   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
 pod1   ClusterIP   172.30.91.248   <none>        80/TCP    24s

2. Check the LB is created in Openstack
 $ openstack loadbalancer list
 +--------------------------------------+-----------+----------------------------------+---------------+---------------------+----------+
 | id                                   | name      | project_id                       | vip_address   | provisioning_status | provider |        
 +--------------------------------------+-----------+----------------------------------+---------------+---------------------+----------+
 | ...                                                                                                                                  |
 | ae520515-a2e8-4dd7-8179-168257c8bd8d | test/pod1 | e8b0db94fa684f9c93377c9ee7774677 | 172.30.91.248 | ACTIVE              | octavia  |
 +--------------------------------------+-----------+----------------------------------+---------------+---------------------+----------+

3. Delete the service
 $ oc delete svc pod1
 service "pod1" deleted 

4. Delete kuryr-controller pod during LB deletion
 $ oc -n openshift-kuryr delete pod kuryr-controller-598c6d476f-rb2fh
 pod "kuryr-controller-598c6d476f-rb2fh" deleted

 $ openstack loadbalancer list
 +--------------------------------------+-------------------------------------+--------------+---------------------+----------+
 | id                                   | name                                | vip_address  | provisioning_status | provider |        
 +--------------------------------------+-------------------------------------+--------------+---------------------+----------+
 | ...                                                                                                                        |
 | 8fc0b3cb-b811-443b-be7a-dd506aadea06 | ostest-87j2j-kuryr-api-loadbalancer | 172.30.0.1   | PENDING_DELETE      | octavia  |
 | ae520515-a2e8-4dd7-8179-168257c8bd8d | test/pod1                           | 72.30.91.248 | PENDING_DELETE      | octavia  |
 +--------------------------------------+-------------------------------------+--------------+---------------------+----------+

5. Check the LB has been deleted in Openstack, even with kuryr-controller pod restart
There is no test/pod1 load balancer in `openstack loadbalancer list` but API LB has been deleted as well when it shouldn't.

Reproducer:
- Deploy OCP
- Delete kuryr controller pod
- API LB should not be recreated

Comment 4 Itzik Brown 2020-01-27 15:57:22 UTC
4.4.0-0.nightly-2020-01-24-141203
Using OSP16 with Octavia amphora driver

1. Created a service
2. Verified the LB is in pending state
3. Delete the service
4. Verified the LB got deleted

Comment 6 errata-xmlrpc 2020-05-04 11:20:24 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, 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/RHBA-2020:0581


Note You need to log in before you can comment on or make changes to this bug.