summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-06-03 14:25:59 +0000
committerTarmac <>2011-06-03 14:25:59 +0000
commit56c3418d535ebd7299e93dd5dce718aeec64478c (patch)
treedbd2d29d08b956b3b5186926b4db5ba775c2306a /nova/exception.py
parent0fd5e0ca8b2d6f9c081b9c31cca7e4ad27d5141c (diff)
parent82e56f5c6e1e0e2a0ac3d48705a1acfd39a1aeab (diff)
downloadnova-56c3418d535ebd7299e93dd5dce718aeec64478c.tar.gz
nova-56c3418d535ebd7299e93dd5dce718aeec64478c.tar.xz
nova-56c3418d535ebd7299e93dd5dce718aeec64478c.zip
Adds LeastCostScheduler which uses a series of cost functions and associated weights to determine which host to provision to.
Left for future work: * Handle scheduling of many instances (currently assumes n=1) * Handle scheduling of arbitrary resources (currently weigh_hosts only handles instances) * Add more cost functions (currently just noop and fill-first) * Simulator so we can determine sensible values for cost-function-weights NOTE: This patch depends on Sandy's dist-scheduler-2a patch.
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index eaafa7692..69b3e0359 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -486,6 +486,15 @@ class SchedulerHostFilterNotFound(NotFound):
message = _("Scheduler Host Filter %(filter_name)s could not be found.")
+class SchedulerCostFunctionNotFound(NotFound):
+ message = _("Scheduler cost function %(cost_fn_str)s could"
+ " not be found.")
+
+
+class SchedulerWeightFlagNotFound(NotFound):
+ message = _("Scheduler weight flag not found: %(flag_name)s")
+
+
class InstanceMetadataNotFound(NotFound):
message = _("Instance %(instance_id)s has no metadata with "
"key %(metadata_key)s.")