This handle the senlin cluster disable/clean
for disable it will detach the polices from the cluster
and resize the cluster to zero (empty cluster)
for clean it will deatach the policies from cluster
clean the policies, receivers then clean the clusters then clean
the profiles
Change-Id: I09421d55c66d91a747bc786fdd250730c79dfd34
This feature allow the disable of most of the project resources
in some cases the admin want to disable the project and wait
for period of time before deleting the resources just in case
some resources are still usable or need to be moved to another
project
for nova the disable will stop the servers
for neutron it will change the admin_state_up to false which
will change the status of resource to down
for glance it will deactivate the images
for swift it will remove the read/write acls to container
for octaivia chenge the admin_state_up to false making the
status of loadbalancer down
for cinder it will change the volume to readonly
for the resources that dont have a way of disabling the
resource it will just log a warning
Change-Id: Ic2af6ad1ffb1e749a3d1ba687950264b5098bcdb
Update to use a new-style zuul role for devstack testing.
Remove references to Shade/os_client_config and use OpenstackSDK.
Change-Id: Ieecc4043b613e333948c32e7e93ad1d383d1f3ec
* Use an ASCII name for the VM name to workaround a Nova bug.
* Pass --os-domain-id parameter to ospurge to purge the
invisible_to_admin project
Related-Bug: #1730756
Change-Id: Ie1507a3564d1d8919148228fa647be63e725c7bc
After OSPurge has ran on one project, this patch asserts that volumes
and volume backups in other projects have not been deleted.
Also, we must separate the case when cinder-backup is running and when
it is not. We know (for now) that c-bak is enabled in Gate runs.
Change-Id: I0064e43c7b8476943370aa365b6c0d3160d157b0
This commit is a whole new version of OSPurge. Currently OSPurge suffers
from the following limitations:
* It's slow (monothread)
* It's not guaranteed to complete. If a resource fails to be deleted then
OSPurge can choke on deleting other resources that depends on the first one.
* Not properly unit tested.
* Not modular (one huge file to deal with all services)
This new version is:
* Faster (multithreaded, thanks to a ThreadPoolExecutor)
* Safe (we check and wait for some prerequisites before attempting a
delete)
* 100% unit tested.
* Modular (one file per service)
Note that it's Python3.5 compatible. It also uses OpenStack Shade
and OpenStack client-config libraries so that OSPurge focuses on the
cleaning logic only.
Overall I believe this is a better version of OSPurge and more future
proof. NOte that we tagged and released OSPurge 1.3 recently in case
the new version was not satisfactory to everybody.
Change-Id: I5eb92a0556df210ea3cb4e471b8db3b5bf7ed5ee
Work items:
* Create a dummy Heat stack
* Introduce shell variables for external network name, flavor name
and image name that can be overriden by the ENV
* Check that those variables correspond to resources that actually
exist on the Cloud
* Fix a bug in exit_if_empty use: if $1 was actually empty then $2
would be mistakenly used as $1 (an empty string is not considered
as an argument in bash)
Change-Id: I727dc90029aa26820f6e9e29ca112b7ef2a69800
ospopulate.bash creates a bunch of resources in the project set by the
OS_TENANT_NAME environment variable. Credentials have to be set in the
environment as usual. The goal of ospopulate.bash is to ease testing
of ospurge.
Change-Id: I14da32cbc690f3fd21706dd808ac25563d48a689