mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 16:49:35 +00:00
CRI client: use default timeout for ImageFsInfo RPC
The RPC call usually does not take much time for containerd or CRI-O. We now assume the default timeout is fine and therefore resolve the `TODO`. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
parent
faf89fe5e9
commit
e055a1f89a
@ -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