nova-manage db purge-deleted-instances

Registered by Matt Riedemann

This blueprint has been superseded. See the newer blueprint "Simple DB Purging" for updated plans.

Until we have automated DB archival ( or no more soft delete ( we should have a way to purge soft deleted instances from the database along with their related meta tables like instance_metadata, instance_system_metadata, instance_info_cache, instance_extra, tags, etc. basically whatever shows up under nova.objects.Instance.INSTANCE_OPTIONAL_ATTRS:

This would be similar to the nova-manage db null-instance-uuid-scan command:

Which scans the database looking for instance_uuid records in other tables where the uuid value is NULL and then deletes them, and has a sort of dry-run option so you can see what would be deleted if you actually do it, and the help message would point out that this is actually doing to delete data so be careful.

Then it just goes and finds all soft-deleted instances along with those related meta tables and deletes them all (the purge).

Lots of deployments already have a set of tools/scripts that already do something like this but they have to go directly into the nova database to do it, with a nova-manage db command we can at least ship it with the code and test it until better solutions are implemented, like the aforementioned archive or no more soft delete specs.

Blueprint information

Dan Smith
Matt Riedemann
Needs approval
Nicolas Hicher
Series goal:
Needs Code Review
Milestone target:
Started by
John Garbutt
Completed by
Matt Riedemann

Related branches



Gerrit topic:,topic:bp/purge-deleted-instances-cmd,n,z

Addressed by:
    Spec: add nova-manage db purge-deleted-instances

Addressed by:
    This commit adds the functionality to purge soft-deleted instances from the DB, along with data in tables directly related to the soft-deleted instance.

Sorry, we have now hit the Non-Priority Feature Freeze for Mitaka. For more details please see: and
--johnthetubaguy 2016.02.08

Addressed by:
    Purge soft-deleted instances cmd

Addressed by:
    Purge soft-deleted instances cmd

Addressed by:
    Purge soft-deleted instances cmd


Work Items

This blueprint contains Public information 
Everyone can see this information.