Fix exists status for azure GetLoadBalancer

This commit is contained in:
Dong Liu 2018-01-09 15:16:45 +08:00
parent 57888103a5
commit e2b6b1d7eb

View File

@ -78,10 +78,10 @@ func (az *Cloud) GetLoadBalancer(clusterName string, service *v1.Service) (statu
if err != nil {
return nil, false, err
}
if exists == false {
if !exists {
serviceName := getServiceName(service)
glog.V(5).Infof("getloadbalancer (cluster:%s) (service:%s)- IP doesn't exist in any of the lbs", clusterName, serviceName)
return nil, false, fmt.Errorf("Service(%s) - Loadbalancer not found", serviceName)
glog.V(5).Infof("getloadbalancer (cluster:%s) (service:%s) - doesn't exist", clusterName, serviceName)
return nil, false, nil
}
return status, true, nil
}