From e94deedd42f79a5e63e2f3b13be31cd0b57d24e6 Mon Sep 17 00:00:00 2001 From: Hans Lindgren Date: Tue, 12 Mar 2013 16:11:39 +0100 Subject: Fix: Nova aggregate API throws an uncaught exception on invalid host Add ComputeHostNotFound to the caught exceptions. Resolves bug 1154138. Change-Id: I385b88b85caf534f51db70577eb62361e8cc461f --- nova/api/openstack/compute/contrib/aggregates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') 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 -- cgit