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:
		| @@ -91,9 +91,9 @@ func loadShim(ctx context.Context, bundle *Bundle, onClose func()) (_ ShimInstan | ||||
| 		// To prevent flood of error messages, the expected error | ||||
| 		// should be reset, like os.ErrClosed or os.ErrNotExist, which | ||||
| 		// depends on platform. | ||||
| 		err = checkCopyShimLogError(ctx, err) | ||||
| 		err = checkCopyShimLogError(shimCtx, err) | ||||
| 		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() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fu Wei
					Fu Wei