summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Elliott <brian.elliott@rackspace.com>2012-10-16 15:58:20 +0000
committerBrian Elliott <brian.elliott@rackspace.com>2012-10-16 15:58:20 +0000
commit2649f14673f8ef5ca257583f1cdf5fe57d4734b9 (patch)
tree9f6dc92d61d684a9d63c8c7795df93d314949232
parentbff0ee67779eafb4872e1d8ef8d36c311fd2424b (diff)
downloadnova-2649f14673f8ef5ca257583f1cdf5fe57d4734b9.tar.gz
nova-2649f14673f8ef5ca257583f1cdf5fe57d4734b9.tar.xz
nova-2649f14673f8ef5ca257583f1cdf5fe57d4734b9.zip
Set host prior to allocating network information.
Make sure 'host' field on the instance is set before allocating network information. bug 1065004 Change-Id: I7b929fd50a057c8c69a0b83e07cdc5cd9cb55b45
-rw-r--r--nova/compute/manager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 7cd54bd75..20aa07276 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -482,13 +482,14 @@ class ComputeManager(manager.SchedulerDependentManager):
self._notify_about_instance_usage(
context, instance, "create.start",
extra_usage_info=extra_usage_info)
- network_info = self._allocate_network(context, instance,
- requested_networks)
+ network_info = None
try:
limits = filter_properties.get('limits', {})
with self.resource_tracker.resource_claim(context, instance,
limits):
+ network_info = self._allocate_network(context, instance,
+ requested_networks)
block_device_info = self._prep_block_device(context,
instance)
instance = self._spawn(context, instance, image_meta,
@@ -533,7 +534,7 @@ class ComputeManager(manager.SchedulerDependentManager):
try:
self._deallocate_network(context, instance)
except Exception:
- # do not attempt retry if network de-allocation occurs:
+ # do not attempt retry if network de-allocation failed:
_log_original_error()
raise