This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 1777891 - [RFE] Network cascade deletion
Summary: [RFE] Network cascade deletion
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ga
: ---
Assignee: Slawek Kaplonski
QA Contact: Eran Kuris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-28 15:41 UTC by Luis Tomas Bolivar
Modified: 2023-10-20 19:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-20 19:47:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1870319 0 None None None 2020-04-02 11:17:49 UTC
Red Hat Issue Tracker OSP-2653 0 None None None 2021-11-18 15:24:08 UTC
Red Hat Issue Tracker OSP-29936 0 None None None 2023-10-20 19:47:35 UTC
Red Hat Issue Tracker   OSPRH-518 0 None None None 2023-10-20 19:47:56 UTC

Description Luis Tomas Bolivar 2019-11-28 15:41:42 UTC
To be able to delete a neutron network, first we need to detach its subnet from the router and also eliminate all the ports and subports that are on the network.

From the OpenShift on OpenStack with Kuryr use case point of view, it would be great to have a similar command to the one already existing for octavia loadbalancers deletion: openstack loadbalancer delete --cascade LB_ID. In the same way as cascade deleting the loadbalancer makes octavia to take care of the listeners, pools and members deletion before deleting the loadbalancer, it will be great to have an 'openstack network delete --cascade NET_ID' (or --force) that takes care of removing the ports/subports associated to that network.

For the OpenShift on OpenStack with kuryr use case, there is a new network/subnet per each OpenShift namespace. In addition, pods are connected to the Neutron networks by using subports attached to trunks, whose parent port is the one associated to the VM where the pod is running. This leads that everytime a namespace is deleted, instead of just deleting the network, kuryr needs to make the next calls to neutron API:
a) Detach the subnet from the router
b) Remove all the ports in DOWN status
c) Get all the ports in ACTIVE status (those are subports attached to trunks):
- For each of those ports, find the trunk they are attached to
- Detach the port from the associated trunk
- Delete the port
d) Delete the network. Note this will take care of removing the subnet. But also, if the previous calls to detach the subports and delete them has not yet finished, this call will fail and needs to be retried


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