placement/nova
Dan Smith 411113a2dd Archive instance-related rows when the parent instance is deleted
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
2016-09-27 12:08:21 -07:00
..
api/openstack [placement] 404 responses do not cause exception logs 2016-09-23 13:17:24 +00:00
CA some cleanup. VSA flag status changes. returned some files 2011-07-25 16:26:23 -07:00
conf Merge "conf: Make list->dict conversion more specific" 2016-09-26 10:50:30 +00:00
db Archive instance-related rows when the parent instance is deleted 2016-09-27 12:08:21 -07:00
objects Address feedback on cell-aggregate-api-db patches 2016-08-01 11:46:59 -07:00
policies policy: Add defaults in code (part 1) 2016-06-23 19:53:29 +03:00
scheduler/filters Don't raise error when filtering on custom metadata 2016-05-06 13:29:57 +00:00
tests Merge "[placement] 404 responses do not cause exception logs" 2016-09-26 10:45:36 +00:00
virt/hyperv Remove baremetal virt driver 2014-10-08 13:41:37 +00:00
volume/encryptors :Add missing %s in print message 2016-07-25 16:43:21 +08:00
i18n.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test.py Use StableObjectJsonFixture from o.vo 2016-08-29 11:52:10 -04:00
utils.py Merge "Properly quote IPv6 address in RsyncDriver" 2016-08-18 13:17:19 +00:00