From 2fdd73816c56b578a65466db4e5a86b9b191e1c1 Mon Sep 17 00:00:00 2001 From: Monsyne Dragon Date: Fri, 6 Jul 2012 18:28:21 +0000 Subject: 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 --- nova/exception.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nova/exception.py') 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. -- cgit