archive_deleted_rows isn't archiving instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Dan Smith |
Bug Description
Running "nova-manage archive_
for example running the command several times
$ nova-manage --debug db archive_
I get
+------
| Table | Number of Rows Archived |
+------
| block_device_
| instance_actions | 31838 |
| instance_
| instance_extra | 10108 |
| instance_faults | 459 |
| instance_
| instance_metadata | 6037 |
| instance_
| reservations | 9 |
+------
the only way I've been able to get an instances archived is to lower the --max-rows parameter, but this only deletes a small number of the instances and sometimes doesn't archive any at all
In my nova-mange.log I have the following error
2016-09-12 09:22:21.658 17603 WARNING nova.db.
mysql -e 'select count(*) from instances where deleted_at is not NULL;' nova
+----------+
| count(*) |
+----------+
| 70829 |
+----------+
I'm running mitaka with this patch installed
https:/
tags: | added: db |
Changed in nova: | |
assignee: | nobody → leehom (feli5) |
Changed in nova: | |
status: | New → Confirmed |
assignee: | leehom (feli5) → Roman Podoliaka (rpodolyaka) |
importance: | Undecided → Medium |
status: | Confirmed → New |
assignee: | Roman Podoliaka (rpodolyaka) → nobody |
Changed in nova: | |
assignee: | leehom (feli5) → nobody |
I checked this on devstack master and rows are soft-deleted / archived properly:
https:/ /github. com/openstack/ nova/blob/ master/ nova/db/ sqlalchemy/ api.py# L1838-L1840 (InstanceExtra row is soft-deleted on soft-deletion of an instance) /github. com/openstack/ nova/blob/ master/ nova/db/ sqlalchemy/ api.py# L6392 (tables are processed in reverse order based on FKs, so that we delete referencing tables first)
https:/
http:// paste.openstack .org/show/ 572335/
It's not clear to me, how you can run into this problem, given the fact creation / soft-deletion of InstanceExtra rows was added at the same time in https:/ /review. openstack. org/#/c/ 108097