Bug 1763278 - kuryrnet and neutron resources leftovers after kuryr-controller restart
Summary: kuryrnet and neutron resources leftovers after kuryr-controller restart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.3.0
Assignee: Luis Tomas Bolivar
QA Contact: Jon Uriarte
URL:
Whiteboard:
Depends On:
Blocks: 1763279
TreeView+ depends on / blocked
 
Reported: 2019-10-18 16:25 UTC by Luis Tomas Bolivar
Modified: 2020-01-23 11:08 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kuryr-kubernetes pull 73 0 'None' 'closed' 'Bug 1763278: Remove namespace leftover upon kuryr-controller restart' 2019-11-20 11:29:39 UTC
Launchpad 1848761 0 None None None 2019-10-18 16:25:43 UTC
OpenStack gerrit 689440 0 'None' 'MERGED' 'Remove namespace leftover upon kuryr-controller restart' 2019-11-20 11:29:38 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:08:40 UTC

Description Luis Tomas Bolivar 2019-10-18 16:25:44 UTC
When a namespace is deleted, kuryr-controller is in charge of
deleting its associated openstack resources (net, subnet and ports)
as well as the associated KuryrNet CRD.

As removing OpenStack resources may take some time, if the
kuryr-controller is restarted by any different reason during that
process, the resources are left behind as no new events for the
namespace (already deleted) happen after the restart.

Comment 1 Jon Uriarte 2019-10-23 10:59:09 UTC
Verified in 4.3.0-0.nightly-2019-10-22-165241 build on top of OSP 13 2019-10-01.1 puddle.

Steps:
1. Create project (namespace):
 $ oc new-project e2e-test

2. Check Kuryr resources (kuryrnets and namespace)
 $ oc get kuryrnets  | grep e2e | wc -l
 1

 $ oc get namespace  | grep e2e | wc -l
 1

3. Delete the project (namespace):
 $ oc delete project e2e-test 

4. Delete Kuryr controller pod:
 $ oc -n openshift-kuryr delete pod  kuryr-controller-c7898f449-phbms

5. Check Kuryr resources (kuryrnets and namespace)
 $ oc get kuryrnets  | grep e2e | wc -l
 1

 $ oc get namespace  | grep e2e | wc -l
 0

kuryrnets was not deleted before the pod was deleted.

6. Check the pod is started:
(shiftstack) [stack@undercloud-0 kubernetes]$ oc get pods -n openshift-kuryr 
NAME                                   READY   STATUS    RESTARTS   AGE      
kuryr-cni-7lfgw                        1/1     Running   0          18h      
kuryr-cni-dphvg                        1/1     Running   0          18h      
kuryr-cni-qw5gs                        1/1     Running   0          18h      
kuryr-cni-sxxkp                        1/1     Running   0          18h      
kuryr-cni-t5x9l                        1/1     Running   0          18h      
kuryr-cni-tf7gp                        1/1     Running   1          18h      
kuryr-controller-c7898f449-cjfmn       1/1     Running   0          5m40s

7. Check kuryrnets was deleted:
$ oc get kuryrnets  | grep e2e | wc -l
0

Comment 3 errata-xmlrpc 2020-01-23 11:08:20 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:0062


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