diff --git a/staging/src/k8s.io/cri-client/pkg/remote_image.go b/staging/src/k8s.io/cri-client/pkg/remote_image.go index b067697766b..faf4bdc80b7 100644 --- a/staging/src/k8s.io/cri-client/pkg/remote_image.go +++ b/staging/src/k8s.io/cri-client/pkg/remote_image.go @@ -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)