Skip to content

Commit 3689ac1

Browse files
committed
Fix pull-timeout flag for crictl pull
We need to specify the right timeout. Fixes a flaking CI test in `e2e` as well. Signed-off-by: Sascha Grunert <[email protected]>
1 parent fc92a8d commit 3689ac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/crictl/image.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var pullImageCommand = &cli.Command{
126126
return err
127127
}
128128
}
129-
timeout := c.Duration("timeout")
129+
timeout := c.Duration("pull-timeout")
130130
r, err := PullImageWithSandbox(imageClient, imageName, auth, sandbox, ann, timeout)
131131
if err != nil {
132132
return fmt.Errorf("pulling image: %w", err)
@@ -664,7 +664,7 @@ func PullImageWithSandbox(client internalapi.ImageManagerService, image string,
664664
defer cancel()
665665

666666
if timeout > 0 {
667-
logrus.Debugf("Using context with timeout of %s", timeout)
667+
logrus.Debugf("Using pull context with timeout of %s", timeout)
668668
ctx, cancel = context.WithTimeout(ctx, timeout)
669669
defer cancel()
670670
}

0 commit comments

Comments
 (0)