diff --git a/pkg/agent/manager/loadbalancer/loadbalancer.go b/pkg/agent/manager/loadbalancer/loadbalancer.go index c8d0dda..5a05399 100644 --- a/pkg/agent/manager/loadbalancer/loadbalancer.go +++ b/pkg/agent/manager/loadbalancer/loadbalancer.go @@ -695,17 +695,16 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error { } isError := true - var errCheck error for _, errCh := range errChList { - errCheck = <-errCh - if errCheck == nil { + err := <-errCh + if err == nil { isError = false } } if isError { retIPAMOnErr = isError - klog.Errorf("failed to add load-balancer. err: %v", errCheck) - return fmt.Errorf("failed to add loxiLB loadBalancer. err: %v", errCheck) + klog.Errorf("failed to add load-balancer") + return fmt.Errorf("failed to add loxiLB loadBalancer") } m.lbCache[cacheKey].LbModelList = append(m.lbCache[cacheKey].LbModelList, lbModelList...) if ingSvcPair.InRange || ingSvcPair.StaticIP {