mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +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.
|
// ImageFsInfo returns information of the filesystem that is used to store images.
|
||||||
func (r *remoteImageService) ImageFsInfo(ctx context.Context) (*runtimeapi.ImageFsInfoResponse, error) {
|
func (r *remoteImageService) ImageFsInfo(ctx context.Context) (*runtimeapi.ImageFsInfoResponse, error) {
|
||||||
// Do not set timeout, because `ImageFsInfo` takes time.
|
ctx, cancel := context.WithTimeout(ctx, r.timeout)
|
||||||
// TODO(random-liu): Should we assume runtime should cache the result, and set timeout here?
|
|
||||||
ctx, cancel := context.WithCancel(ctx)
|
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
return r.imageFsInfoV1(ctx)
|
return r.imageFsInfoV1(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user