mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Better logs in service controller
This commit is contained in:
parent
2052e334b6
commit
78322091f0
@ -352,18 +352,20 @@ func (s *ServiceController) persistUpdate(service *api.Service) error {
|
|||||||
// out so that we can process the delete, which we should soon be receiving
|
// out so that we can process the delete, which we should soon be receiving
|
||||||
// if we haven't already.
|
// if we haven't already.
|
||||||
if errors.IsNotFound(err) {
|
if errors.IsNotFound(err) {
|
||||||
glog.Infof("Not persisting update to service that no longer exists: %v", err)
|
glog.Infof("Not persisting update to service '%s/%s' that no longer exists: %v",
|
||||||
|
service.Namespace, service.Name, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// TODO: Try to resolve the conflict if the change was unrelated to load
|
// TODO: Try to resolve the conflict if the change was unrelated to load
|
||||||
// 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 that has been changed since we received it: %v", err)
|
glog.V(4).Infof("Not persisting update to service '%s/%s' that has been changed since we received it: %v",
|
||||||
|
service.Namespace, service.Name, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
glog.Warningf("Failed to persist updated LoadBalancerStatus to service %s after creating its load balancer: %v",
|
glog.Warningf("Failed to persist updated LoadBalancerStatus to service '%s/%s' after creating its load balancer: %v",
|
||||||
service.Name, err)
|
service.Namespace, service.Name, err)
|
||||||
time.Sleep(clientRetryInterval)
|
time.Sleep(clientRetryInterval)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user