The patch I03cf285ad83e09d88cdb702a88dfed53c01610f8 fixed most of the
possible cases for this to happen but missed one. An early enough
exception during _delete() can cause that the instance_uuid never gets
defined but then we try to use it during the finally block. This patch
moves the saving of the instance_uuid to the top of the try block to
avoid the issue.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /805605 /opendev. org/openstack/ nova/commit/ 14e43f385e6d243 b6efd11a777d082 e63b66367c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 14e43f385e6d243 b6efd11a777d082 e63b66367c
Author: Balazs Gibizer <email address hidden>
Date: Mon Aug 23 10:56:58 2021 +0200
Avoid unbound instance_uuid var during delete
The patch I03cf285ad83e09 d88cdb702a88dfe d53c01610f8 fixed most of the
possible cases for this to happen but missed one. An early enough
exception during _delete() can cause that the instance_uuid never gets
defined but then we try to use it during the finally block. This patch
moves the saving of the instance_uuid to the top of the try block to
avoid the issue.
Change-Id: Ib3073d7f595c89 27532b7c49fc7e5 ffe80d508b9
Closes-Bug: #1940812
Related-Bug: #1914777