Merge pull request #11621 from k8s-infra-cherrypick-robot/cherry-pick-11475-to-release/2.0
[release/2.0] fix: call checkCopyShimLogError(shimCtx) to avoid expected error log flood
This commit is contained in:
commit
9e97c2e626
@ -91,9 +91,9 @@ func loadShim(ctx context.Context, bundle *Bundle, onClose func()) (_ ShimInstan
|
|||||||
// To prevent flood of error messages, the expected error
|
// To prevent flood of error messages, the expected error
|
||||||
// should be reset, like os.ErrClosed or os.ErrNotExist, which
|
// should be reset, like os.ErrClosed or os.ErrNotExist, which
|
||||||
// depends on platform.
|
// depends on platform.
|
||||||
err = checkCopyShimLogError(ctx, err)
|
err = checkCopyShimLogError(shimCtx, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.G(ctx).WithError(err).Error("copy shim log after reload")
|
log.G(shimCtx).WithError(err).Error("copy shim log after reload")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
onCloseWithShimLog := func() {
|
onCloseWithShimLog := func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user