When deleting an instance, if the network info is empty, we should
refresh the info because we can't be sure the copy of the cache we
have when we fetched the instance to delete is up-to-date, i.e. if
we're racing to delete the server while it's building and the
network info cache was updated in the database after we started the
delete operation and got the instance from the DB, then we could
fail to unplug VIFs.
Reviewed: https:/ /review. opendev. org/665143 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=54ec03a52a7 a327021022547c7 5368db5e157852
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 54ec03a52a7a327 021022547c75368 db5e157852
Author: Arnaud Morin <email address hidden>
Date: Wed May 22 17:34:20 2019 +0200
Refresh instance network info on deletion
When deleting an instance, if the network info is empty, we should
refresh the info because we can't be sure the copy of the cache we
have when we fetched the instance to delete is up-to-date, i.e. if
we're racing to delete the server while it's building and the
network info cache was updated in the database after we started the
delete operation and got the instance from the DB, then we could
fail to unplug VIFs.
Closes-Bug: #1830081
Change-Id: I99601773406c61 f93002e2f7cbb24 8cf73cef0ab e8962df033c2da8 92c95561fe)
Signed-off-by: Arnaud Morin <email address hidden>
(cherry picked from commit d4ed0d8b7adc350