Skip to content

Commit 7f55109

Browse files
authored
Merge pull request kubernetes#128052 from saschagrunert/imagefsinfo-timeout
CRI client: use default timeout for ImageFsInfo RPC
2 parents 9a0b07d + e055a1f commit 7f55109

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

staging/src/k8s.io/cri-client/pkg/remote_image.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,7 @@ func (r *remoteImageService) RemoveImage(ctx context.Context, image *runtimeapi.
232232

233233
// ImageFsInfo returns information of the filesystem that is used to store images.
234234
func (r *remoteImageService) ImageFsInfo(ctx context.Context) (*runtimeapi.ImageFsInfoResponse, error) {
235-
// Do not set timeout, because `ImageFsInfo` takes time.
236-
// TODO(random-liu): Should we assume runtime should cache the result, and set timeout here?
237-
ctx, cancel := context.WithCancel(ctx)
235+
ctx, cancel := context.WithTimeout(ctx, r.timeout)
238236
defer cancel()
239237

240238
return r.imageFsInfoV1(ctx)

0 commit comments

Comments
 (0)