If the compute service is restarted while build requests are
executing the instance_claim or waiting for the COMPUTE_RESOURCE_SEMAPHORE
then those instances will be stuck forever in BUILDING state. If the instance
already finished instance_claim then instance.host is set and when the
compute restarts the instance is put to ERROR state.
This patch changes compute service startup to put instances into
ERROR state if they a) are in the BUILDING state, and b) have
allocations on the compute resource provider, but c) do not have
instance.host set to that compute.
Note: changes in manager.py and test_compute_mgr.py compared to Queens:
* the signature change of the get_allocations_for_resource_provider
call is due to I7891b98f225f97ad47f189afb9110ef31c810717 is missing from
stable/pike.
* the VirtDriverNotReady exception does not exists in pike as
Ib0ec1012b74e9a9e74c8879f3feed5f9332b711f is missing. In pike ironic
returns an empty node list instead of raising an exception so the bugfix
and the test is adapted accordingly.
Change-Id: I856a3032c83fc2f605d8c9b6e5aa3bcfa415f96a
Closes-Bug: #1833581
(cherry picked from commit a1a735bc6efa40d8277c9fc5339f3b74f968b58e)
(cherry picked from commit 06fd7c730172190d7bf7d52bc9062eecba8d7d27)
(cherry picked from commit cb951cbcb246221e04a063cd7b5ae2e83ddfe6dd)
(cherry picked from commit 13bb7ed701121955ba015103c2e44429927e78d4)
(cherry picked from commit 4164b96de9f62fdc35a12adf514d767460187d55)
Reviewed: https:/ /review. opendev. org/687918 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e5892ed61b5 f4f4f581384e245 d5052e7bf840b2
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit e5892ed61b5f4f4 f581384e245d505 2e7bf840b2
Author: Balazs Gibizer <email address hidden>
Date: Fri Jun 21 16:48:14 2019 +0200
Error out interrupted builds
If the compute service is restarted while build requests are RESOURCE_ SEMAPHORE
executing the instance_claim or waiting for the COMPUTE_
then those instances will be stuck forever in BUILDING state. If the instance
already finished instance_claim then instance.host is set and when the
compute restarts the instance is put to ERROR state.
This patch changes compute service startup to put instances into
ERROR state if they a) are in the BUILDING state, and b) have
allocations on the compute resource provider, but c) do not have
instance.host set to that compute.
Note: changes in manager.py and test_compute_mgr.py compared to Queens: _for_resource_ provider ad47f189afb9110 ef31c810717 is missing from b74e9a9e74c8879 f3feed5f9332b71 1f is missing. In pike ironic
* the signature change of the get_allocations
call is due to I7891b98f225f97
stable/pike.
* the VirtDriverNotReady exception does not exists in pike as
Ib0ec1012
returns an empty node list instead of raising an exception so the bugfix
and the test is adapted accordingly.
Change-Id: I856a3032c83fc2 f605d8c9b6e5aa3 bcfa415f96a 8277c9fc5339f3b 74f968b58e) d7bf7d52bc9062e ecba8d7d27) e04a063cd7b5ae2 e83ddfe6dd) 5ba015103c2e444 29927e78d4) c35a12adf514d76 7460187d55)
Closes-Bug: #1833581
(cherry picked from commit a1a735bc6efa40d
(cherry picked from commit 06fd7c730172190
(cherry picked from commit cb951cbcb246221
(cherry picked from commit 13bb7ed70112195
(cherry picked from commit 4164b96de9f62fd