Delete archived records instantly

Bug #1852121 reported by Mohammed Naser
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Wishlist
Unassigned

Bug Description

At the moment, in order to clean up a database, you will have to archive first and then run the delete afterwards.

If the operator doesn't care about the ability of restoring deleted instances, it means that the archive step is useless for them.

It would be nice if we added an option to archive to simply purge directly instead of archive (then use purge records command afterwards).

Tags: nova-manage
Revision history for this message
Matt Riedemann (mriedem) wrote :

The archive_deleted_rows command already has a --purge option on it so you can do it in a single run:

https://docs.openstack.org/nova/latest/cli/nova-manage.html#nova-database

nova-manage db archive_deleted_rows --until-complete --purge

So the "it would be nice" part here is skipping archive to make getting to the purge part faster?

Has anyone looked at how long the archive takes compared to the purge and if it's worthwhile to refactor all of that code to not archive? Seems to me like it's not really worth the trouble in refactoring the code especially when you can just run this thing in a background cron.

tags: added: nova-manage
Changed in nova:
importance: Undecided → Wishlist
Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
Rajesh Tailor (ratailor)
Changed in nova:
assignee: nobody → Rajesh Tailor (ratailor)
Rajesh Tailor (ratailor)
Changed in nova:
assignee: Rajesh Tailor (ratailor) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.