Description of problem: Need an update of nova-manage tool to help with Compute housekeeping. Currently, the main housekeeping job (manual, that is) for Compute is that of DB cleanup. From Russell, "Nova (and other services) use a "soft delete" of rows. Instead of actually deleting the instance record from the database, we just mark a deleted column. Some may want to delete all of these occasionally." Adding this to the tool would be user friendly (the alternative is to write down instructions).
Is it possible to get a Kbase on covering manual steps for now? If this was covered as part of the more general discussion around cleanup tasks then please link it.
Russell responded with the above to an email question about Compute housekeeping. Martin Lopes has been working on a housekeeping article to include what we do know: https://bugzilla.redhat.com/show_bug.cgi?id=1154535
There are a couple of ongoing upstream efforts to address this: https://review.openstack.org/#/c/200224/ https://review.openstack.org/#/c/137669/
This is being worked on upstream already: https://review.openstack.org/#/c/203751/
We will monitor the progress of work on this, and grab this patch the moment it merges. However, it's at -2 for process reasons right now (no new features are accepted in this version anymore), so it will not be merged until OSP10/newton.
*** Bug 1283619 has been marked as a duplicate of this bug. ***
This is currently stalled and thus it is not clear this will make Newton, we will continue to monitor. Note that going forward as certain objects move to the new API database they will no longer have "soft-deletion" and as a result wont leave as many spurious database records around. This will not be the case for the instance records though.
Moved to Queens/RHOSP 13 to reflect current upstream reality, upstream work on this item has stalled and will need to be restarted.
Removing Triaged, this needs to be re-assessed.
*** Bug 1540637 has been marked as a duplicate of this bug. ***
*** Bug 1500362 has been marked as a duplicate of this bug. ***
This is now fully merged upstream. To test this, it's possible to just use the existing archive command on a database with deleted records: nova-manage db archive_deleted_rows --all-cells --purge --verbose --until-complete The verbose output should show many rows archived, and purged. When complete, the shadow tables (shadow_instances for example) should be empty.
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://access.redhat.com/errata/RHEA-2019:0045