The "purge" feature- 1 command for all components

Bug #1584596 reported by Alex Stafeyev on 2016-05-23
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Wishlist
Unassigned

Bug Description

Hi all,
After working with "neutron purge" and testing it, we have some thoughts regarding the feature.

Due to the fact that this feature's purpose is to clean all network objects after tenant was deleted, we think that the "purge" command should clear not only Neutron objects, but all tenant owned objects that were not deleted after tenant deletion. "One action cleans all".

Additionally, we had a thought to make this purge command run behind the scene after "openstack project delete" command execution, which will clean the deleted tenant objects without a user to feel anything. The manual option should stay available of course.

BR
Alex

Assaf Muller (amuller) on 2016-05-23
affects: neutron → python-openstackclient
description: updated
Dean Troyer (dtroyer) wrote :

I think there is room for value-add commands like this, I am not sure it belongs directly in the OSC repo.

Specifically, something as comprehensive as 'purge the entire cloud of project X' might need more visibility into the cloud than OSC can provide, but I do think we should consider how to implement this sort of thing anyway.

Changed in python-openstackclient:
importance: Undecided → Wishlist
Assaf Muller (amuller) wrote :

This topic (Cloud wide project purge) has been discussed in the past few years in different forums with different people. It went through a couple of iterations in the Neutron context and it was finally decided to do it client side. Considering the complexity involved, I think that is the best approach. Alternatives included reacting to events that Keystone already sends or providing a Neutron API. The way I see it implemented in the openstack client is to offer a purge command:

openstack purge <project_id>

With some sort of plugin system, or at least totally independent code per project, that would be registered to be invoked as part of the purge command. For example, network resources deletion would he handled in its own file or plugin, as would compute, storage, etc. The end result is that the user gets a great experience, similar to https://github.com/openstack/ospurge, but maintained officially as part of the OpenStack client.

Cloud admins could then use 'openstack purge <project_id> as part of their own script that would also possibly reach out to billing systems, email notifications, etc.

Steve Martinelli (stevemar) wrote :

So in general I like the idea. A lot of deployers use ospurge and it would be nice to have it in OSC. A few points:

1) We could clean up everything that is currently cleaned up with ospurge with the exception of heat stacks and ceilometer alarms.

2) If we were to delete heat stacks, we could create a plugin so heatclient (a current OSC plugin) could do some action on ospurge. (Not sure how to do this, but I think it's possible).

3) Ceilometer is not, and AFAIK, does not intend to be an OSC plugin. So deleting ceilometer alarms would not be possible right away.

Richard Theis (rtheis) on 2016-10-03
tags: added: network
John Davidge (john-davidge) wrote :

Since we've already implemented this in the neutronclient[1], would porting that part over to OSC be a good starting point? In the process we could define the plugin framework Assaf describes above - laying the groundwork for support for other projects in the future. Would love to spend some time on this.

[1] https://review.openstack.org/#/c/276541/

Reviewed: https://review.openstack.org/367673
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=227d4c64ef4ac04b5fed6cdff035821bf0e6ae7e
Submitter: Jenkins
Branch: master

commit 227d4c64ef4ac04b5fed6cdff035821bf0e6ae7e
Author: Steve Martinelli <email address hidden>
Date: Thu Sep 8 15:13:38 2016 -0700

    Add project purge command to osc

    See the initial implementation:
      https://github.com/openstack/ospurge/blob/master/ospurge/client.py

    Partial-Bug: 1584596

    Change-Id: I3aa86af7c85e7ca3b7f04b43e8e07125f7d956d1

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

Other bug subscribers