summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJason Koelker <jason@koelker.net>2011-09-18 19:36:16 +0000
committerTarmac <>2011-09-18 19:36:16 +0000
commit2835134095fb645caac5cd7720febfa871084c05 (patch)
treeef70f3ce2dff4104b596d5471cb0950be2908b19 /nova/compute
parent09b902638a38f1965101182d66cde3cd661e39c4 (diff)
parent364802336339eee72fdacd0ee2935822f7bfdc93 (diff)
Remove vestigial db call for fixed_ips.
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index b5de6f048..46c643aee 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -1392,11 +1392,6 @@ class ComputeManager(manager.SchedulerDependentManager):
instance_ref = self.db.instance_get(context, instance_id)
hostname = instance_ref['hostname']
- # Getting fixed ips
- fixed_ips = self.db.instance_get_fixed_addresses(context, instance_id)
- if not fixed_ips:
- raise exception.FixedIpNotFoundForInstance(instance_id=instance_id)
-
# If any volume is mounted, prepare here.
if not instance_ref['volumes']:
LOG.info(_("%s has no volume."), hostname)
@@ -1412,6 +1407,11 @@ class ComputeManager(manager.SchedulerDependentManager):
# Retry operation is necessary because continuously request comes,
# concorrent request occurs to iptables, then it complains.
network_info = self._get_instance_nw_info(context, instance_ref)
+
+ fixed_ips = [nw_info[1]['ips'] for nw_info in network_info]
+ if not fixed_ips:
+ raise exception.FixedIpNotFoundForInstance(instance_id=instance_id)
+
max_retry = FLAGS.live_migration_retry_count
for cnt in range(max_retry):
try: