cri: increase default 2s timeout for crictl commands#22214
Conversation
|
/ok-to-test |
|
You shouldn't have special code for docker, that seems like a legacy from the dockershim? i.e. it should also call Need to remove docker from the code... |
…econfig preferences.
…nces from test kubeconfig
thats a good idea, I can do that in a separate PR I think I wanna limit this PR to crictl only |
|
Was just reflecting on the "containerd and crio" subject, while the change is related to CRI (i.e. everything) |
thanks, changed the title, also created an issue for removing docker calls for CRI calls in the code base, will be tested in a sepaerate PR |
There was a problem hiding this comment.
Pull request overview
This PR increases the default timeout for crictl commands from 2 seconds to 10 seconds to fix timeout issues encountered in KVM CRIO Linux Tests, specifically where "image ls" commands were hitting the 2-second limit and failing with "context deadline exceeded" errors.
Key Changes:
- Added a constant
timeoutOverrideFlag = "--timeout=10s"to override crictl's default 2s timeout - Updated crictl commands in
crictlList,getCRIInfo, andlistCRIImagesto use the new timeout flag - Updated test mocks and expectations to handle the new timeout parameter
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/minikube/cruntime/cri.go | Added timeout constant and applied it to crictl ps, crictl info, and crictl images commands |
| pkg/minikube/cruntime/cruntime_test.go | Updated fake crictl implementation to strip timeout flag before processing test commands |
| pkg/minikube/bootstrapper/bsutil/kubeadm_test.go | Updated test expectations to include the timeout flag in the crictl info command |
| pkg/minikube/kubeconfig/testdata/kubeconfig/config1 | Removed the preferences: {} line from test data (appears unrelated to the PR's purpose) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| current-context: minikube | ||
| kind: Config | ||
| preferences: {} | ||
| users: null |
There was a problem hiding this comment.
This change appears to be unrelated to the PR's purpose of increasing crictl command timeouts. The removal of the "preferences: {}" line from this kubeconfig test data should be in a separate PR or the PR description should explain why this change is necessary.
| users: null | |
| users: [] |
|
kvm2 driver with docker runtime DetailsTimes for minikube start: 43.7s 40.9s 39.5s 42.2s 41.1s Times for minikube ingress: 15.7s 15.7s 16.2s 15.7s 15.7s docker driver with docker runtime DetailsTimes for minikube (PR 22214) start: 20.5s 25.4s 24.6s 25.2s 24.2s Times for minikube (PR 22214) ingress: 10.6s 10.6s 10.6s 10.6s 10.6s docker driver with containerd runtime DetailsTimes for minikube start: 21.2s 22.8s 22.3s 22.5s 21.6s Times for minikube ingress: 24.1s 23.2s 23.2s 23.1s 23.1s |
|
@medyagh: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
@medyagh: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Here are the number of top 10 failed tests in each environments with lowest flake rate.
Besides the following environments also have failed tests:
To see the flake rates of all tests by environment, click here. |
* fix: add 10s timeout to crictl images command to prevent hangs * feat: Introduce a 10s timeout override flag and apply it to crictl ps, info, and images commands. * feat: add timeout flag to `crictl info` commands and remove empty kubeconfig preferences. * fix: properly handle `crictl --timeout` flag and remove empty preferences from test kubeconfig
attempt to fix this in KVM CRIO Linux Tests
where "image ls" hits the limit
#21754 (comment)