From 834fc60a8ca852be64aaaaeb5ebb3cc0de807fef Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Fri, 7 Jun 2013 18:11:09 +0100 Subject: xenapi: revisit error handling around calls to agent Now we have settings to hint if the agent is present or not, and by default we do not check for the agent, if the agent is not responding to our calls for its version, we can fail the build. In environments that need the agent to inject the networking, you really want the agent to fail if it is not present. If the agent did not inject the networking, the server will have no networking. However, we can still leave the agent upgrade to silently fail, as the agent should be backwards compatible. fixes bug 1188540 Change-Id: I8acdabd8d2bd24b088dad3cd4abec300d0ada3fb --- nova/exception.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index c774b56cc..2b3903e1e 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1241,6 +1241,19 @@ class CoreAPIMissing(NovaException): message = _("Core API extensions are missing: %(missing_apis)s") +class AgentError(NovaException): + message = _('Error during following call to agent: %(method)s') + + +class AgentTimeout(AgentError): + message = _('Unable to contact guest agent. ' + 'The following call timed out: %(method)s') + + +class AgentNotImplemented(AgentError): + message = _('Agent does not support the call: %(method)s') + + class InstanceGroupNotFound(NotFound): message = _("Instance group %(group_uuid)s could not be found.") -- cgit