Commit be5f9094 authored by Sebastien LAWNICZAK's avatar Sebastien LAWNICZAK

Fix : do not try to delete floatingIP if it does not exists

parent 65c23ea0
...@@ -776,11 +776,13 @@ func (lb *LoadBalancer) EnsureTCPLoadBalancerDeleted(name, region string) error ...@@ -776,11 +776,13 @@ func (lb *LoadBalancer) EnsureTCPLoadBalancerDeleted(name, region string) error
if err != nil && !isNotFound(err) { if err != nil && !isNotFound(err) {
return err return err
} }
if floatingIP != nil {
error := floatingips.Delete(lb.network, floatingIP.ID).ExtractErr() error := floatingips.Delete(lb.network, floatingIP.ID).ExtractErr()
if error != nil && !isNotFound(error) { if error != nil && !isNotFound(error) {
return error return error
} }
} }
}
// We have to delete the VIP before the pool can be deleted, // We have to delete the VIP before the pool can be deleted,
// so no point continuing if this fails. // so no point continuing if this fails.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment