mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 15:39:39 +00:00
Modify klog Warning 'The resourceVersion for the provided watch is too old' to Info.
This warning comes from Reflector watchHandler, from the apiserver error that indicates a watch was restarted. This happens when etcd drops the connection and resources are relisted. This informs the user that the watchers are operating properly, so should be logged as Info rather than Warning. Kubernetes-commit: a953d1542c06456c6fe97121abd99acd352545df
This commit is contained in:
parent
8352f269cd
commit
23e6ea699e
5
tools/cache/reflector.go
vendored
5
tools/cache/reflector.go
vendored
@ -299,8 +299,13 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||||||
|
|
||||||
if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
|
if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
|
||||||
if err != errorStopRequested {
|
if err != errorStopRequested {
|
||||||
|
switch {
|
||||||
|
case apierrs.IsResourceExpired(err):
|
||||||
|
klog.V(4).Infof("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
||||||
|
default:
|
||||||
klog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
klog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user