summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorHans Lindgren <hanlind@kth.se>2013-03-12 16:11:39 +0100
committerHans Lindgren <hanlind@kth.se>2013-03-13 15:35:03 +0100
commite94deedd42f79a5e63e2f3b13be31cd0b57d24e6 (patch)
treeeb92bd4f9bdca676ba4d9aa22c239ca645e4d1ca /nova/api
parent562b0787421b145c4a91ccbbcacfc74c340cead8 (diff)
downloadnova-e94deedd42f79a5e63e2f3b13be31cd0b57d24e6.tar.gz
nova-e94deedd42f79a5e63e2f3b13be31cd0b57d24e6.tar.xz
nova-e94deedd42f79a5e63e2f3b13be31cd0b57d24e6.zip
Fix: Nova aggregate API throws an uncaught exception on invalid host
Add ComputeHostNotFound to the caught exceptions. Resolves bug 1154138. Change-Id: I385b88b85caf534f51db70577eb62361e8cc461f
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/aggregates.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py
index 84b0358a3..b73a50f39 100644
--- a/nova/api/openstack/compute/contrib/aggregates.py
+++ b/nova/api/openstack/compute/contrib/aggregates.py
@@ -167,7 +167,8 @@ class AggregateController(object):
authorize(context)
try:
aggregate = self.api.remove_host_from_aggregate(context, id, host)
- except (exception.AggregateNotFound, exception.AggregateHostNotFound):
+ except (exception.AggregateNotFound, exception.AggregateHostNotFound,
+ exception.ComputeHostNotFound):
LOG.info(_("Cannot remove host %(host)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPNotFound