instance_group_member records not purged from nova_api DB for deleted instances

Bug #1778804 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Medium
Matt Riedemann
Pike
Confirmed
Medium
Unassigned
Queens
Confirmed
Medium
Unassigned

Bug Description

Instance group member records used to be in the cell databases but were moved to the API database in Ocata. Previously, when deleting an instance in the cell, we'd also delete it's instance group membership record in the same cell database. Now that instance group membership is modeled in the API DB, we don't cleanup the instance group membership record when an instance is deleted.

The server groups API handles this by filtering out deleted instances which are still listed as group members:

https://github.com/openstack/nova/blob/351faa959fc228c726848a68e6ea3f3dadde025e/nova/api/openstack/compute/server_groups.py#L47

However, we could make that more efficient if we didn't have to do those queries / filtering in the first place, by removing the nova_api.instance_group_member records when archiving the database, like we do for instance_mappings request_specs records:

https://github.com/openstack/nova/blob/351faa959fc228c726848a68e6ea3f3dadde025e/nova/cmd/manage.py#L553-L561

Tags: db performance
Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/588943

Changed in nova:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.