From 26b1523eba3805a497c23e3b6707a85670ee11be Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Tue, 7 Aug 2012 19:53:24 +0000 Subject: Return 409 error if get_vnc_console is called before VM is created Fixes bug 1034117 In the xenapi driver, the URL returned for a VNC console will include information to locate the particular VM on the dom0, however the VM isn't create until part way through the build process. This leaves a window where a 404 error could be returned by the os-getVNCConsole action. Change this to return a 409 meaning it's not ready yet. Change-Id: Icc3b288d1aae12eb264b2be7fc8f9465d568af74 --- 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 9c579322b..7e3976d0f 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -327,6 +327,10 @@ class InstanceNotInRescueMode(Invalid): message = _("Instance %(instance_id)s is not in rescue mode") +class InstanceNotReady(Invalid): + message = _("Instance %(instance_id)s is not ready") + + class InstanceSuspendFailure(Invalid): message = _("Failed to suspend instance") + ": %(reason)s" -- cgit