Merge pull request #38419 from freehan/service-status-update

Automatic merge from submit-queue

bump log level on service status update

ref: https://github.com/kubernetes/kubernetes/issues/38349

I tried to reproduce the problem in #38349 and failed. Not sure why service status update failed and service controller skip status update in the next round. What I have observed is that if service status update failed due to conflict, the next round of processServiceUpdate will correct it. 

Bumping log level to get a better signal when it occurs.
This commit is contained in:
Kubernetes Submit Queue 2016-12-12 12:42:53 -08:00 committed by GitHub
commit 5e6578a734

View File

@ -302,7 +302,7 @@ func (s *ServiceController) createLoadBalancerIfNeeded(key string, service *v1.S
return fmt.Errorf("Failed to persist updated status to apiserver, even after retries. Giving up: %v", err), notRetryable return fmt.Errorf("Failed to persist updated status to apiserver, even after retries. Giving up: %v", err), notRetryable
} }
} else { } else {
glog.V(2).Infof("Not persisting unchanged LoadBalancerStatus to registry.") glog.V(2).Infof("Not persisting unchanged LoadBalancerStatus for service %s to registry.", key)
} }
return nil, notRetryable return nil, notRetryable
@ -327,7 +327,7 @@ func (s *ServiceController) persistUpdate(service *v1.Service) error {
// balancer status. For now, just rely on the fact that we'll // balancer status. For now, just rely on the fact that we'll
// also process the update that caused the resource version to change. // also process the update that caused the resource version to change.
if errors.IsConflict(err) { if errors.IsConflict(err) {
glog.V(4).Infof("Not persisting update to service '%s/%s' that has been changed since we received it: %v", glog.Warningf("Not persisting update to service '%s/%s' that has been changed since we received it: %v",
service.Namespace, service.Name, err) service.Namespace, service.Name, err)
return nil return nil
} }