Skip to content

Commit a2a79cd

Browse files
committed
Fix #1586
1 parent f0bf294 commit a2a79cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IM/connectors/OpenStack.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1626,9 +1626,12 @@ def add_elastic_ip_from_pool(self, vm, node, fixed_ip=None, pool_name=None):
16261626
retries = 5
16271627
delay = 5
16281628
attached = False
1629+
ports = node.driver.ex_get_node_ports(node)
16291630
while not attached and cont < retries:
1631+
port_num = cont % len(ports)
1632+
port_id = ports[port_num].id
16301633
try:
1631-
node.driver.ex_attach_floating_ip_to_node(node, floating_ip)
1634+
node.driver.ex_attach_floating_ip_to_node(node, floating_ip, port_id)
16321635
attached = True
16331636
except Exception as atex:
16341637
self.log_warn("Error attaching a Floating IP to the node: %s" % get_ex_error(atex))

0 commit comments

Comments
 (0)