Bug 1785136

Summary: subnets and networks leftovers without associated kuryrnet object
Product: OpenShift Container Platform Reporter: Luis Tomas Bolivar <ltomasbo>
Component: NetworkingAssignee: Luis Tomas Bolivar <ltomasbo>
Networking sub component: kuryr QA Contact: Jon Uriarte <juriarte>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: juriarte
Version: 4.3.0Keywords: Triaged
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1785138 (view as bug list) Environment:
Last Closed: 2020-05-04 11:20:43 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:
Bug Depends On:    
Bug Blocks: 1785138    

Description Luis Tomas Bolivar 2019-12-19 09:12:27 UTC
If the kuryr controller gets restarted, there is still chances of leaking networks and subnet resources. This may happen if it gets restarted after creating the network resources for a namespace and before adding the kuryrnet object (or if that fails and it gets restarted before the rollback). This ends up with networks/subnets that don't have a kuryrnet object associated. In that situation, if the namespace gets deleted, the created network/subnet is left behind, and the clean up mechanism does not account for them either.

Comment 2 Jon Uriarte 2020-02-20 10:57:12 UTC
Verified in 4.4.0-0.nightly-2020-02-17-131733 build on top of OSP 13 2020-01-15.3 puddle.

The OCP installer finishes successfully:

 $ oc get clusterversion
 NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
 version   4.4.0-0.nightly-2020-02-17-131733   True        False         16h     Cluster version is 4.4.0-0.nightly-2020-02-17-131733

After running kubernetes/conformance test from origin release-4.4 there are no leftovers, and kuryr-controller pod has been restarted
several times during the tests, which means that it has removed the leftovers upon the restart.

Creating manually a ns, deleting the kuryrnet, the ns and kuryr-controller pod also worked, there were no network or subnet related to it.

$ oc new-project test
$ oc delete ns test; oc delete kuryrnet ns-test; oc -n openshift-kuryr delete pod kuryr-controller-84cc8d55b7-jkchk
$ openstack network list | grep test; openstack subnet list | grep test
no leftovers related to test namespace

Comment 4 errata-xmlrpc 2020-05-04 11:20:43 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