Bug 1325678 - [RFE] [Neutron] Tenant resources cleanup with a single CLI/API call
Summary: [RFE] [Neutron] Tenant resources cleanup with a single CLI/API call
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 9.0 (Mitaka)
Assignee: Assaf Muller
QA Contact: Toni Freger
URL:
Whiteboard:
: 1270836 1426006 1426450 1431098 (view as bug list)
Depends On:
Blocks: 1339444
TreeView+ depends on / blocked
 
Reported: 2016-04-10 15:18 UTC by Nir Yechiel
Modified: 2019-08-15 05:55 UTC (History)
14 users (show)

Fixed In Version: openstack-neutron-8.0.0-1.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-11 12:16:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1511574 0 None None None 2016-04-10 15:18:16 UTC
OpenStack gerrit 276541 0 None None None 2016-04-10 15:24:00 UTC
Red Hat Product Errata RHEA-2016:1597 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 9 Release Candidate Advisory 2016-08-11 16:06:52 UTC

Description Nir Yechiel 2016-04-10 15:18:17 UTC
Description of problem:

A problem was identified where removing a tenant can leave behind stray routers, ports, etc. For RHOSP customers this was solved till now by manually running a script.

It was suggested that a simple 'neutron purge <tenant_id>' command or similar would simplify the process of cleaning up these stray resources by removing everything associated with the given tenant.

The expectation is that this command would be admin-only, and neutron should not be responsible for deciding whether the action is 'safe'. It should work regardless of whether the given tenant is active or not.

Comment 2 Nir Yechiel 2016-04-10 15:22:46 UTC
The addition of the 'neutron purge' command allows cloud admins to conveniently delete multiple neutron resources associated with a given tenant.

The command will delete all supported resources provided that they can be deleted (not in use, etc) and feedback the amount of each resource deleted to the user. A completion percentage is also given to keep the user informed of progress.

Currently supports deletion of:

*Networks
*Subnets (implicitly)
*Routers
*Ports (including router interfaces)
*Floating IPs
*Security Groups

Comment 4 Nir Yechiel 2016-04-10 17:19:25 UTC
*** Bug 1270836 has been marked as a duplicate of this bug. ***

Comment 5 Alexander Stafeyev 2016-04-17 05:31:18 UTC
(In reply to Nir Yechiel from comment #2)
> The addition of the 'neutron purge' command allows cloud admins to
> conveniently delete multiple neutron resources associated with a given
> tenant.
> 
> The command will delete all supported resources provided that they can be
> deleted (not in use, etc) and feedback the amount of each resource deleted
> to the user. A completion percentage is also given to keep the user informed
> of progress.
> 
> Currently supports deletion of:
> 
> *Networks
> *Subnets (implicitly)
> *Routers
> *Ports (including router interfaces)
> *Floating IPs
> *Security Groups

Hi Nir, 

Are the basic dependencies should prevent the command execution? 
For example- I cannot delete router (nor net/subnet) when we have ports attached to it. What is the expected behavior in this case? 

Tnx

Comment 6 Nir Yechiel 2016-04-17 07:51:40 UTC
(In reply to Alexander Stafeyev from comment #5)
> (In reply to Nir Yechiel from comment #2)
> > The addition of the 'neutron purge' command allows cloud admins to
> > conveniently delete multiple neutron resources associated with a given
> > tenant.
> > 
> > The command will delete all supported resources provided that they can be
> > deleted (not in use, etc) and feedback the amount of each resource deleted
> > to the user. A completion percentage is also given to keep the user informed
> > of progress.
> > 
> > Currently supports deletion of:
> > 
> > *Networks
> > *Subnets (implicitly)
> > *Routers
> > *Ports (including router interfaces)
> > *Floating IPs
> > *Security Groups
> 
> Hi Nir, 
> 
> Are the basic dependencies should prevent the command execution? 
> For example- I cannot delete router (nor net/subnet) when we have ports
> attached to it. What is the expected behavior in this case? 
> 
> Tnx

The command will delete all supported resources provided that **they can be deleted (not in use)**. Also, A resource being in use by another tenant (for example, a shared network) can prevent it from being deleted. Please see http://docs.openstack.org/mitaka/networking-guide/misc-neutron-purge.html

Comment 10 Alexander Stafeyev 2016-07-11 14:00:07 UTC
Ran on 2016-06-05 

build - 2016-04-29.6

Comment 12 errata-xmlrpc 2016-08-11 12:16:24 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://rhn.redhat.com/errata/RHEA-2016-1597.html

Comment 13 Assaf Muller 2017-02-23 23:02:46 UTC
*** Bug 1426006 has been marked as a duplicate of this bug. ***

Comment 14 Assaf Muller 2017-02-24 14:21:21 UTC
*** Bug 1426450 has been marked as a duplicate of this bug. ***

Comment 15 Assaf Muller 2017-03-10 12:15:42 UTC
*** Bug 1431098 has been marked as a duplicate of this bug. ***


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