mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Merge pull request #128052 from saschagrunert/imagefsinfo-timeout
CRI client: use default timeout for ImageFsInfo RPC
This commit is contained in:
commit
7f5510921d
@ -232,9 +232,7 @@ func (r *remoteImageService) RemoveImage(ctx context.Context, image *runtimeapi.
|
||||
|
||||
// ImageFsInfo returns information of the filesystem that is used to store images.
|
||||
func (r *remoteImageService) ImageFsInfo(ctx context.Context) (*runtimeapi.ImageFsInfoResponse, error) {
|
||||
// Do not set timeout, because `ImageFsInfo` takes time.
|
||||
// TODO(random-liu): Should we assume runtime should cache the result, and set timeout here?
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
ctx, cancel := context.WithTimeout(ctx, r.timeout)
|
||||
defer cancel()
|
||||
|
||||
return r.imageFsInfoV1(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user