Bug 1940159

Summary: [OSP] cluster destruction fails to remove router in BYON (with provider network) with Kuryr as primary network
Product: OpenShift Container Platform Reporter: Emilien Macchi <emacchi>
Component: InstallerAssignee: Maysa Macedo <mdemaced>
Installer sub component: OpenShift on OpenStack QA Contact: Udi Shkalim <ushkalim>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: mdulko, pprinett
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:53:56 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: 2066406    

Description Emilien Macchi 2021-03-17 17:25:09 UTC
Version:

$ openshift-install version
openshift-install 4.7.2
built from commit 98e11541c24e95c864328b9b35c64b77836212ed
release image quay.io/openshift-release-dev/ocp-release@sha256:83fca12e93240b503f88ec192be5ff0d6dfe750f81e8b5ef71af991337d7c584

Also reproduced on 4.8 (current master).

Platform:

OpenStack / IPI / Kuryr enabled / Provider network in subnetID (primary interface)

What happened?

When destroying the cluster, the external-router created by Kuryr can't be removed because there is still a port attached to that router.
It's always the same router: cluster-name+id-external-router (e.g. testcluster-tm4hx-external-router)

Because the port is from the provider network and is not tagged in OCP, so it'll never get removed.

DEBUG Exiting deleting openstack ports             
DEBUG goroutine deletePorts complete               
DEBUG Deleting Router "9409710e-0d48-453c-ba66-8cb3390b6a09" 
ERROR Deleting router "9409710e-0d48-453c-ba66-8cb3390b6a09" failed: Expected HTTP response code [] when accessing [DELETE http://192.168.3.38:9696/v2.0/routers/9409710e-0d48-453c-ba66-8cb3390b6a09], but got 409 instead 
ERROR {"NeutronError": {"type": "RouterInUse", "message": "Router 9409710e-0d48-453c-ba66-8cb3390b6a09 still has ports", "detail": ""}} 
DEBUG Exiting deleting openstack routers

Workaround:
Remove manually with:
openstack router remove subnet <externa-router-id> <provider-network-subnet-id>

Comment 2 Udi Shkalim 2021-06-08 12:00:34 UTC
Verified on: 4.8.0-0.nightly-2021-06-03-055145

The router is created by Kuryr and deleted upon openshift-install destroy cluster command.

Comment 5 errata-xmlrpc 2021-07-27 22:53:56 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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/RHSA-2021:2438