From 3d27a0e74bde3878af76414dc4020ac6f9f24e4e Mon Sep 17 00:00:00 2001 From: Yufang Zhang Date: Thu, 20 Jun 2013 18:17:49 +0800 Subject: Handle NoMoreFixedIps in _shutdown_instance. Bug 1192893 If no fixed ips is found, continue to perform the rest of the instance shutdown, instead of propogating the exception. Steps to reproduce: 1. Create a network 2. Reserve all fixed ips of the network 3. Try to create an instance but failed 4. Try to delete the instance Results: Cannot delete the instance due to the 'NoMoreFixedIps' exception. Change-Id: I42776c427773f1f81c16062a9aaa54850ec68bfd --- nova/compute/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 1def5b069..bd4e6f772 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1344,7 +1344,7 @@ class ComputeManager(manager.SchedulerDependentManager): # get network info before tearing down try: network_info = self._get_instance_nw_info(context, instance) - except exception.NetworkNotFound: + except (exception.NetworkNotFound, exception.NoMoreFixedIps): network_info = network_model.NetworkInfo() # NOTE(vish) get bdms before destroying the instance -- cgit