summaryrefslogtreecommitdiff
path: root/nova/exception.py
diff options
context:
space:
mode:
authorEric Fried <efried@us.ibm.com>2018-06-18 14:12:04 -0500
committerEric Fried <efried@us.ibm.com>2018-08-28 14:05:24 -0500
commit232117ecfc37d8538c432594a6ad8a2eed0c224f (patch)
tree0249032959f9b1383cc3a99718aca02f0a3e52d6 /nova/exception.py
parentb23bf6d6ab60abde40c58cba25fc2694d3a0277e (diff)
downloadnova-232117ecfc37d8538c432594a6ad8a2eed0c224f.tar.gz
Compute: Handle reshaped provider trees
This is the compute side "plumbing" for the referenced blueprint, implementing changes in the compute manager, resource tracker, and virt driver interface. - The `startup` parameter (indicating compute service startup vs. periodic task) is percolated from the compute manager's update_available_resource all the way down the call stack to the resource tracker's _update method, where it is used to determine whether to allow the virt driver's update_provider_tree to indicate that a reshape is required. - The update_provider_tree method gets a new `allocations` parameter. When None, the method should raise ReshapeNeeded (see below) if inventories need to be moved, whereupon the resource tracker will populate the `allocations` parameter and reinvoke update_provider_tree with it. - A new ReshapeNeeded exception is introduced. It is used as a signal by the virt driver that inventories need to be moved. It should *only* be raised by the virt driver a) on startup, and b) when the `allocations` parameter is None. - The compute manager's _update_available_resource_for_node gets special exception handling clauses for ReshapeNeeded and ReshapeFailed, both of which blow up the compute service on startup. (On periodic, where this should "never" happen, they just make the logs red. We may later want to disable the compute service or similar to make this unusual catastrophic event more noticeable.) Change-Id: Ic062446e5c620c89aec3065b34bcdc6bf5966275 blueprint: reshape-provider-tree
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index e262100210..a9c9c4bbd6 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -2383,3 +2383,8 @@ class ConsumerAllocationRetrievalFailed(NovaException):
class ReshapeFailed(NovaException):
msg_fmt = _("Resource provider inventory and allocation data migration "
"failed: %(error)s")
+
+
+class ReshapeNeeded(NovaException):
+ msg_fmt = _("Virt driver indicates that provider inventories need to be "
+ "moved.")