diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-10-06 00:30:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-10-06 00:30:40 +0000 |
| commit | 72c45bd2ad930922be86c810b393187e4f5564bc (patch) | |
| tree | b748f9102f91310c6887959f056750a0661cf01c /nova/api | |
| parent | 981f52794ed41b6f25dfc4a25b4b736e8f030a0f (diff) | |
| parent | eff0a63758ad59d62045bf913423cdd0c440fa28 (diff) | |
| download | nova-72c45bd2ad930922be86c810b393187e4f5564bc.tar.gz nova-72c45bd2ad930922be86c810b393187e4f5564bc.tar.xz nova-72c45bd2ad930922be86c810b393187e4f5564bc.zip | |
Merge "Fixes bug 862658 -- ec2 metadata issue getting IPs"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index a6a10c767..759259519 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -271,7 +271,8 @@ class CloudController(object): """Return all floating IPs for an instance""" ret_floaters = [] - fixed_ips = self._get_fixed_ips_for_instance(context, instance) + # only loop through ipv4 addresses + fixed_ips = self._get_fixed_ips_for_instance(context, instance)[0] for ip in fixed_ips: floaters = self._get_floaters_for_fixed_ip(context, ip) # Allows a short circuit if we just need any floater. @@ -287,6 +288,7 @@ class CloudController(object): search_opts = {'project_id': project_id} for instance in self.compute_api.get_all(context, search_opts=search_opts): + # only look at ipv4 addresses fixed_ips = self._get_fixed_ips_for_instance(context, instance)[0] if fixed_ips: line = '%s slots=%d' % (fixed_ips[0], instance['vcpus']) |
