Skip to content

Commit 18e017f

Browse files
Merge pull request #221 from vdombrovski/fix-public-ip-assignment
GetPublicIPs: never choose an already assigned IP
2 parents c7aa8dd + f376aa6 commit 18e017f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pkg/cloud/isolated_network.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,6 @@ func (c *client) GetPublicIP(
141141
// Ignore already allocated here since the IP was specified.
142142
return publicAddresses.PublicIpAddresses[0], nil
143143
} else if publicAddresses.Count > 0 { // Endpoint not specified.
144-
// TODO: Use tags to prevent clash with this logic.
145-
for _, v := range publicAddresses.PublicIpAddresses { // Pick first available address.
146-
if v.Allocated != "" && v.Associatednetworkid == isoNet.Spec.ID && !v.Issourcenat { // IP Already allocated.
147-
return v, nil
148-
}
149-
}
150144
for _, v := range publicAddresses.PublicIpAddresses { // Pick first available address.
151145
if v.Allocated == "" { // Found un-allocated Public IP.
152146
return v, nil

0 commit comments

Comments
 (0)