411113a2dd
This is something I expect has been very broken for a long time. We have rows in tables such as instance_extra, instance_faults, etc that pertain to a single instance, and thus have a foreign key on their instance_uuid column that points to the instance. If any of those records exist, an instance can not be archived out of the main instances table. The archive routine currently "handles" this by skipping over said instances, and eventually iterating over all the tables to pull out any records that point to that instance, thus freeing up the instance itself for archival. The problem is, this only happens if those extra records are actually marked as deleted themselves. If we fail during a cleanup routine and leave some of them not marked as deleted, but where the instance they reference *is* marked as deleted, we will never archive them. This patch adds another phase of the archival process for any table that has an "instance_uuid" column, which attempts to archive records that point to these deleted instances. With this, using a very large real world sample database, I was able to archive my way down to zero deleted, un-archivable instances (from north of 100k). Closes-Bug: #1622545 Change-Id: I77255c77780f0c2b99d59a9c20adecc85335bb18 |
||
---|---|---|
.. | ||
api/openstack | ||
CA | ||
conf | ||
db | ||
objects | ||
policies | ||
scheduler/filters | ||
tests | ||
virt/hyperv | ||
volume/encryptors | ||
i18n.py | ||
test.py | ||
utils.py |