-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make ContainerCreateTimeout configurable at runtime handler level #9499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @snir911. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9499 +/- ##
===========================================
- Coverage 66.95% 55.54% -11.42%
===========================================
Files 202 202
Lines 28247 28219 -28
===========================================
- Hits 18914 15673 -3241
- Misses 7736 10983 +3247
+ Partials 1597 1563 -34 🚀 New features to boost your workflow:
|
f74dbd0
to
a0408f0
Compare
@snir911, what happens when the ContainerCreateTimeout is set to, let's say, 600 (10 minutes), but kubelet's runtimeRequestTimeout is lower than that? What I think that would happen is that kubelet's runtimeRequestTimeout would be the value respected in this case, which makes me think it's at least worth it adding to the documentation that the value set here depends also on the kubelet's value. |
That's right, I'll mention it, thanks @fidencio ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @snir911 !
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: littlejawa, snir911 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
/release-note-edit
|
@bitoku: /release-note-edit must be used with a single release note block. In 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. |
This allows different runtime handlers to have different container creation timeouts, useful for VM-based runtimes that may need longer timeouts than OCI runtimes. Signed-off-by: Snir Schreiber <ssheribe@redhat.com> Fixes: cri-o#9151
Previously, r.task.Create() used r.ctx (background context) which had no timeout, this may cause the goroutine to continue running even after the select timeout was reached. Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
This eliminates duplication and makes the struct cleaner with a single source of truth for configuration values from the handler. Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
- Add container_create_timeout to crio.conf.5.md man page documentation - Add container_create_timeout to configuration template in template.go Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
- Add ValidateContainerCreateTimeout unit tests covering: * Default timeout when not configured (240s) * Valid configured timeout values * Minimum timeout enforcement (30s) * Zero and negative value handling * Large timeout values * Different timeouts per runtime handler Fixes: cri-o#9151 Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
New changes are detected. LGTM label has been removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry one more thing. we want integration tests for this config.
See test/*.bats
for other integration tests.
|
||
@test "container create timeout with custom value" { | ||
# Test that CRI-O starts with valid container_create_timeout configuration | ||
cat > "$CRIO_CONFIG_DIR"/01-timeout.conf << EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to do:
setup_crio
cat > [timeout.conf]...
start_crio_no_setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want at least one test case that ensures it times out in the seconds we set. only shortest (30s) test is enough.
You can use --cancel-timeout
or -T
option to set a client (crictl) timeout.
Add comprehensive BATS integration tests for the container_create_timeout feature introduced in commit 63131b6. These tests verify: - Default timeout value (240s) is applied when not configured - Custom timeout values are properly set and respected - Minimum timeout enforcement (30s minimum) - Different runtime handlers can have different timeout values - Test verifies timeout works with slow container creation Assisted-by: Claude AI Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
@snir911: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
This allows different runtime handlers to have different container creation timeouts,
useful for VM-based runtimes that may need longer timeouts than OCI runtimes.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Fixes #9151 and additional minor fixes
Which issue(s) this PR fixes:
Fixes #9151
Special notes for your reviewer:
Does this PR introduce a user-facing change?