← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Reviewed:  https://review.opendev.org/650995
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1af9de4e6e546111fbe317fcf5392b1a47f2ef20
Submitter: Zuul
Branch:    master

commit 1af9de4e6e546111fbe317fcf5392b1a47f2ef20
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Mon Apr 8 17:18:39 2019 -0400

    Soft delete virtual_interfaces when instance is destroyed
    
    Like the other reference table entries for an instance,
    we should soft_delete virtual_interfaces when destroying
    an instance. Failing to do so can lead to archive issues
    due to the referential constraint.
    
    Change-Id: I04355bdec5477b4c144105fea130089fe1ae6772
    Closes-Bug: #1823781


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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):
  Fix Released

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


References