EC2 instance_id_mappings are never deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
It looks like whenever we create an instance, we create an EC2 instance ID mapping for it:
Which is used by the EC2 objects:
https:/
Which is not really used by much in the API, but it even has a mechanism to 'soft-create' mappings when they pop up:
but a lot of the code seems unreferenced, so I am not sure what is the state of this, however, the problem comes in the fact that it never gets soft deleted anywhere in the code which can lead to...
```
MariaDB [nova]> SELECT COUNT(*) FROM instance_
+----------+
| COUNT(*) |
+----------+
| 3941119 |
+----------+
```
For something entirely not used. I think the fix could be two parts (but I don't understand why the EC2 API is still referneced):
1. Mappings should be created on-demand (which in my case they never will)
2. Mappings should be soft deleted on instane delete (which should make the archiving work).
I'm happy to try and help drive this if we come up with a solution.
This should have been fixed in Stein:
https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1726256# c22
and looks like a duplicate of:
https:/ /bugs.launchpad .net/nova/ +bug/1786298