Remove unnecessary destroy call from Ironic virt driver
To give some context, calling destroy [5] was added as a
bug fix [1]. It was required back then because, Nova compute
was not calling destroy on catching the exception [2]. But now,
Nova compute catches all exceptions that happen during spawn
and calls destroy (_shutdown_instance) [3]
Since Nova compute is already taking care of destroying the
instance before rescheduling, we shouldn't have to call destroy
separately in the driver. I confirmed in logs that destroy gets
called twice if there is any failure during
_wait_for_active() [4] or timeout happens [5]
Reviewed: https:/ /review. openstack. org/240357 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=a36001fbee4 ac039a9121127f7 b9daa7f24a0acc
Committed: https:/
Submitter: Jenkins
Branch: master
commit a36001fbee4ac03 9a9121127f7b9da a7f24a0acc
Author: Shraddha Pandhe <email address hidden>
Date: Fri Oct 30 00:38:18 2015 +0000
Remove unnecessary destroy call from Ironic virt driver
To give some context, calling destroy [5] was added as a instance) [3]
bug fix [1]. It was required back then because, Nova compute
was not calling destroy on catching the exception [2]. But now,
Nova compute catches all exceptions that happen during spawn
and calls destroy (_shutdown_
Since Nova compute is already taking care of destroying the for_active( ) [4] or timeout happens [5]
instance before rescheduling, we shouldn't have to call destroy
separately in the driver. I confirmed in logs that destroy gets
called twice if there is any failure during
_wait_
[1] https:/ /review. openstack. org/#/c/ 99519/ /github. com/openstack/ nova/blob/ 2014.1. 5/nova/ compute/ manager. py#L2116- L2118 /github. com/openstack/ nova/blob/ 2015.1. 2/nova/ compute/ manager. py#L2472- L2497 /github. com/openstack/ nova/blob/ 2015.1. 2/nova/ virt/ironic/ driver. py#L359- L384 /github. com/openstack/ nova/blob/ 2015.1. 2/nova/ virt/ironic/ driver. py#L730- L741
[2] https:/
[3] https:/
[4] https:/
[5] https:/
Closes-Bug: #1506234
Change-Id: I09da7910befc41 67d9cf043d12b19 432ed70bcac