Bug 2023731

Summary: DOWN subports are not cleaned up
Product: OpenShift Container Platform Reporter: Maysa Macedo <mdemaced>
Component: NetworkingAssignee: Maysa Macedo <mdemaced>
Networking sub component: kuryr QA Contact: Itay Matza <imatza>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: imatza, itbrown, rlobillo
Version: 4.9Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2020664 Environment:
Last Closed: 2021-12-06 11:22:27 UTC Type: ---
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: 2020664    
Bug Blocks: 2028274    

Comment 5 Itay Matza 2021-11-30 08:16:22 UTC
Verified in OCP 4.9.9 with Kuryr on top of RHOS-16.1-RHEL-8-20210506.n.1.

- Confirm kuryr pods are up and running:

	$ oc get pods -n openshift-kuryr                                                                                                                                         
	NAME                                READY   STATUS    RESTARTS     AGE
	kuryr-cni-gmfct                     1/1     Running   0            10h
	kuryr-cni-gv9d4                     1/1     Running   0            10h
	kuryr-cni-smt7h                     1/1     Running   0            10h
	kuryr-controller-679ff65665-bhkx8   1/1     Running   1 (9h ago)   10h


- pick one subport:

	$ openstack port list --device-owner "trunk:subport" -f value | tail -1
	febb3d6c-956b-4c9a-8828-b28a37c22f13  fa:16:3e:a7:5a:be [{'subnet_id': '51a27674-5bfe-4e0c-8028-f56a78846725', 'ip_address': '10.128.118.204'}] ACTIVE


- Connect to the database and move the port to DOWN status:
	MariaDB [ovs_neutron]> update ports set status='DOWN' where id='febb3d6c-956b-4c9a-8828-b28a37c22f13';
	Query OK, 1 row affected (0.002 sec)
	Rows matched: 1  Changed: 1  Warnings: 0


- Confirm that the port appears as DOWN:

	$ openstack port list --device-owner "trunk:subport" -f value | tail -1
	febb3d6c-956b-4c9a-8828-b28a37c22f13  fa:16:3e:a7:5a:be [{'subnet_id': '51a27674-5bfe-4e0c-8028-f56a78846725', 'ip_address': '10.128.118.204'}] DOWN
	
	
- Restart kuryr-controller:

	$ oc delete pod -n openshift-kuryr -l app=kuryr-controller
	pod "kuryr-controller-679ff65665-bhkx8" deleted
	
	
- Wait until the pod is up again:

	$ oc get pods -n openshift-kuryr
	NAME                                READY   STATUS    RESTARTS   AGE
	kuryr-cni-gmfct                     1/1     Running   0          10h
	kuryr-cni-gv9d4                     1/1     Running   0          10h
	kuryr-cni-smt7h                     1/1     Running   0          10h
	kuryr-controller-679ff65665-qf7nc   0/1     Running   0          49s


- After ~15 minutes, the port disappeared, and there isn't a port on a DOWN status:

	$ date; openstack port list --device-owner "trunk:subport" -f value | grep DOWN
	Tue Nov 30 03:05:11 EST 2021
	febb3d6c-956b-4c9a-8828-b28a37c22f13  fa:16:3e:a7:5a:be [{'subnet_id': '51a27674-5bfe-4e0c-8028-f56a78846725', 'ip_address': '10.128.118.204'}] DOWN

	$ date; openstack port list --device-owner "trunk:subport" -f value | grep DOWN
	Tue Nov 30 03:06:39 EST 2021

	$ openstack port show febb3d6c-956b-4c9a-8828-b28a37c22f13
	No Port found for febb3d6c-956b-4c9a-8828-b28a37c22f13

Comment 8 errata-xmlrpc 2021-12-06 11:22:27 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 (OpenShift Container Platform 4.9.10 bug fix update), 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-2021:4889