Skip to content

Commit

Permalink
openstack: Use only available floating-ips
Browse files Browse the repository at this point in the history
Prior this patch when it searches for a floating ip to use, it
might return floating IPs that might have been already allocated
for another instance and causes a conflict error.

This patch make sures that only 'Down', or available, floating ips
are requested.
  • Loading branch information
meteorfox committed Dec 15, 2015
1 parent a93147c commit cd4869b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perfkitbenchmarker/providers/openstack/os_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def get_or_create(self):
with self.__floating_ip_lock:
floating_ips = self.__nclient.floating_ips.findall(
fixed_ip=None,
pool=self.ip_pool_name
pool=self.ip_pool_name,
status='Down'
)
if floating_ips:
return floating_ips[0]
Expand Down

0 comments on commit cd4869b

Please sign in to comment.