[RFE] Network cascade deletion API call

Bug #1870319 reported by Slawek Kaplonski on 2020-04-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Wishlist
Slawek Kaplonski

Bug Description

It came originally from Kuryr team and it was already discussed on the PTG in Shanghai.

Use case:
As a cloud user I would like to have API command similar to openstack loadbalancer delete --cascade LB_ID, where I trigger the deletion of a network (openstack network delete --cascade NET_ID) , and it automatically deletes the associated ports/subports and subnets.

Currently what kuryr needs to do to delete "namespace" is:

* Get the ACTIVE ports in the subnet
* Get the trunks
* For each of the ACTIVE port, obtain what trunk they are attached to and call neutron to detach it
* Remove the ports (one by one, there is no bulk deletion)
* Get the DOWN ports in the given subnet
* Remove the ports (one by one, there is no bulk deletion)
* Detach the subnet from the router
* Remove the network (which will also remove the subnet)

YAMAMOTO Takashi (yamamoto) wrote :

can this be a separate service plugin like get-me-a-network thing?

Slawek Kaplonski (slaweq) wrote :

I think that this can be implemented as separate service plugin.

Slawek Kaplonski (slaweq) wrote :

We discussed that on last drivers meeting. Here is summary of this discussion so far:

* amotoki asked if implementation of bulk port deletion would solve main problem which Kuryr has today - it may help if bulk deletion will be also "cascade" and will remove all trunk subports also,

* if we would go with this bulk port deletion with cascade subports deletion, we would be probably close to implement cascade network deletion as well,

* open question: what response should be in case of partial failure?

Nate Johnston (nate-johnston) wrote :

Proposed plan here:

1. Add an option to the existing singleton port deletion behavior that will also remove it from a trunk if it is a trunk subport.

2. Implement bulk object deletion, starting with port deletion.

If these steps work then all that will be left from your earlier list is the initial call to list the existing ports, and at the end to detach the subnet from the router and the remove the network.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers