mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
service_controller: Include service key in error messages
This commit is contained in:
parent
7d4f21d0d7
commit
e3eac372f0
@ -759,7 +759,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,
|
||||||
@ -767,7 +767,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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user