From c7d812a35bf4ef42907366c3f674fd623cd46905 Mon Sep 17 00:00:00 2001 From: Brian Elliott Date: Thu, 21 Jun 2012 04:25:24 +0000 Subject: Keep the ComputeNode model updated with usage Keep the compute host's ComputeNode model in sync with the level of resource usage. This enables the ComputeNode model to be used as a basis for scheduling decisions rather than forcing scheduler to calculate free resources from an instance_get_all on each request. Resources like memory and disk are claimed as instances are built or deleted. There is also support for configurable compute node stats (a generic key/value store) for extensible advertising of other usage stats that may be useful for a particular scheduler implementation. Additionally, there is a periodic task on the compute host that audits actual resource consumption at the virt layer to ensure that the database stays in sync. This change partially implements blueprint: scheduler-resource-race This patch complements: https://review.openstack.org/#/c/9540/ (build re-scheduling support) Change-Id: Ibbe3839a054f8b80664b413d47f766ca8d68e3f2 --- nova/exception.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 5d232bdd8..292f8d6ca 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -351,6 +351,10 @@ class ServiceUnavailable(Invalid): message = _("Service is unavailable at this time.") +class ComputeResourcesUnavailable(ServiceUnavailable): + message = _("Insufficient compute resources.") + + class ComputeServiceUnavailable(ServiceUnavailable): message = _("Compute service is unavailable at this time.") -- cgit