*** This bug is a duplicate of bug 1786298 ***
    https://bugs.launchpad.net/bugs/1786298

** This bug has been marked a duplicate of bug 1786298
   nova-manage db archive_deleted_rows does not cleanup table 
instance_id_mappings

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1890057

Title:
  EC2 instance_id_mappings are never deleted

Status in OpenStack Compute (nova):
  New

Bug description:
  It looks like whenever we create an instance, we create an EC2
  instance ID mapping for it:

  
https://github.com/openstack/nova/blob/df49ad9b29afcafa847b83df445b6627350721b5/nova/db/sqlalchemy/api.py#L1137-L1138

  Which is used by the EC2 objects:

  
https://github.com/openstack/nova/blob/df49ad9b29afcafa847b83df445b6627350721b5/nova/objects/ec2.py

  Which is not really used by much in the API, but it even has a
  mechanism to 'soft-create' mappings when they pop up:

  
https://github.com/openstack/nova/blob/df49ad9b29afcafa847b83df445b6627350721b5/nova/objects/ec2.py#L63-L74

  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_id_mappings;
  +----------+
  | 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1890057/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to