summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorMonsyne Dragon <mdragon@rackspace.com>2012-07-06 18:28:21 +0000
committerMonsyne Dragon <mdragon@rackspace.com>2012-07-10 22:28:33 +0000
commit2fdd73816c56b578a65466db4e5a86b9b191e1c1 (patch)
tree59472212935829ebd82dbd297ed3871d9c8ba791 /nova/exception.py
parent4a981877c9b62863fe6478b813d8ebd7055d94aa (diff)
Refactor instance_usage_audit. Add audit tasklog.
The instance usage audit cronjob that generates periodic compute.instance.exists notifications is not particularly scalable. It is run on one server and takes longer as the number of instances grows. This change moves the generation of those events to a periodic task in the compute manager. It also adds an api extension that can be used by administrators to check for errors generating these events. Change-Id: I856d3d0c73c34e570112f1345d306308ef20a9ae
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index c1f417afe..0efe8e41b 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -1100,6 +1100,14 @@ class CouldNotFetchImage(NovaException):
message = _("Could not fetch image %(image_id)s")
+class TaskAlreadyRunning(NovaException):
+ message = _("Task %(task_name) is already running on host %(host)")
+
+
+class TaskNotRunning(NovaException):
+ message = _("Task %(task_name) is not running on host %(host)")
+
+
def get_context_from_function_and_args(function, args, kwargs):
"""Find an arg of type RequestContext and return it.