Commit ee998335 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54500 from MrHohn/service-controller-more-logging

Automatic merge from submit-queue (batch tested with PRs 54366, 54500). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Service controller / gce loadbalancer logging cleanup **What this PR does / why we need it**: From https://github.com/kubernetes/kubernetes/issues/52495, while looking into the potential scalability issue service controller may have, I found it really hard to debug as the log sometimes doesn't reference which LB it is for, or sometimes it just doesn't log at all. It get even harder that in correctness CIs we reduce verbose level to v1: https://github.com/kubernetes/test-infra/blob/67bc30718f5468cdd64675c2c710118f34af33c3/jobs/env/ci-kubernetes-e2e-gce-scale-correctness.env#L16. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #NONE **Special notes for your reviewer**: /assign @nicksardo @bowei cc @shyamjvs **Release note**: ```release-note NONE ```
parents 598d7e11 d6e8920a
...@@ -761,7 +761,7 @@ func (s *ServiceController) syncService(key string) error { ...@@ -761,7 +761,7 @@ func (s *ServiceController) syncService(key string) error {
if retryDelay != 0 { if retryDelay != 0 {
// Add the failed service back to the queue so we'll retry it. // Add the failed service back to the queue so we'll retry it.
glog.Errorf("Failed to process service. Retrying in %s: %v", retryDelay, err) glog.Errorf("Failed to process service %v. Retrying in %s: %v", key, retryDelay, err)
go func(obj interface{}, delay time.Duration) { go func(obj interface{}, delay time.Duration) {
// put back the service key to working queue, it is possible that more entries of the service // put back the service key to working queue, it is possible that more entries of the service
// were added into the queue during the delay, but it does not mess as when handling the retry, // were added into the queue during the delay, but it does not mess as when handling the retry,
...@@ -769,7 +769,7 @@ func (s *ServiceController) syncService(key string) error { ...@@ -769,7 +769,7 @@ func (s *ServiceController) syncService(key string) error {
s.workingQueue.AddAfter(obj, delay) s.workingQueue.AddAfter(obj, delay)
}(key, retryDelay) }(key, retryDelay)
} else if err != nil { } else if err != nil {
runtime.HandleError(fmt.Errorf("Failed to process service. Not retrying: %v", err)) runtime.HandleError(fmt.Errorf("Failed to process service %v. Not retrying: %v", key, err))
} }
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment