From 20f1a991cb949218b9e7d33d08afa6fdbefb298b Mon Sep 17 00:00:00 2001 From: Hans Lindgren Date: Fri, 25 Jan 2013 13:20:49 +0100 Subject: Live migration with an auto selection of dest Add ability to let scheduler decide on target host during live migration. Implements: blueprint live-migration-scheduling Change-Id: Id596fa3a0ef2b1b5faf854e4b4557b3c4b413e39 --- nova/api/openstack/compute/contrib/admin_actions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/admin_actions.py b/nova/api/openstack/compute/contrib/admin_actions.py index dc3ee8fc4..a3f68e828 100644 --- a/nova/api/openstack/compute/contrib/admin_actions.py +++ b/nova/api/openstack/compute/contrib/admin_actions.py @@ -285,8 +285,12 @@ class AdminActionsController(wsgi.Controller): except exception.ComputeServiceUnavailable as ex: raise exc.HTTPBadRequest(explanation=str(ex)) except Exception: - msg = _("Live migration of instance %(id)s to host %(host)s" - " failed") % locals() + if host is None: + msg = _("Live migration of instance %(id)s to another host" + " failed") % locals() + else: + msg = _("Live migration of instance %(id)s to host %(host)s" + " failed") % locals() LOG.exception(msg) # Return messages from scheduler raise exc.HTTPBadRequest(explanation=msg) -- cgit