← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1823781] [NEW] Related virtual_interfaces not deleted in DB API instance_destroy method

 

Public bug reported:

I found this when testing change
https://review.openstack.org/#/c/570202/ which adds a hard-delete
parameter to the DB API instance_destroy() method.

Normally this isn't a problem because when deleting an instance we call
self.network_api.deallocate_for_instance which will call
db.virtual_interface_delete_by_instance so it's an explicit delete
rather than let the DB API handle it, but we should still handle
VirtualInterface in the instance_destroy() DB API method like the other
related records:

https://github.com/openstack/nova/blob/fb1fee6772bb101eac83845bac9022df77113aaa/nova/db/sqlalchemy/api.py#L1800-L1825

This will be necessary for blueprint cross-cell-resize which won't go
through the network API when hard-deleting an instance from the DB.

** Affects: nova
     Importance: Low
         Status: Triaged


** Tags: db

-- 
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/1823781

Title:
  Related virtual_interfaces not deleted in DB API instance_destroy
  method

Status in OpenStack Compute (nova):
  Triaged

Bug description:
  I found this when testing change
  https://review.openstack.org/#/c/570202/ which adds a hard-delete
  parameter to the DB API instance_destroy() method.

  Normally this isn't a problem because when deleting an instance we
  call self.network_api.deallocate_for_instance which will call
  db.virtual_interface_delete_by_instance so it's an explicit delete
  rather than let the DB API handle it, but we should still handle
  VirtualInterface in the instance_destroy() DB API method like the
  other related records:

  https://github.com/openstack/nova/blob/fb1fee6772bb101eac83845bac9022df77113aaa/nova/db/sqlalchemy/api.py#L1800-L1825

  This will be necessary for blueprint cross-cell-resize which won't go
  through the network API when hard-deleting an instance from the DB.

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


Follow ups