Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit a4ac13a

Browse files
author
FengyunPan
committed
Fix legacy floatingip
If user specify floating-network-id by annotation rather than cloud provider file, openstack cloud provider don't delete floatingip when deleting LoadBalancer service.
1 parent c405b3b commit a4ac13a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancerDeleted(clusterName string, service *v1.
11161116
return nil
11171117
}
11181118

1119-
if lbaas.opts.FloatingNetworkId != "" && loadbalancer != nil {
1119+
if loadbalancer != nil && loadbalancer.VipPortID != "" {
11201120
portID := loadbalancer.VipPortID
11211121
floatingIP, err := getFloatingIPByPortID(lbaas.network, portID)
11221122
if err != nil && err != ErrNotFound {

0 commit comments

Comments
 (0)