Skip to content

Conversation

snir911
Copy link
Contributor

@snir911 snir911 commented Oct 5, 2025

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?

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 5, 2025
Copy link
Contributor

openshift-ci bot commented Oct 5, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@openshift-ci openshift-ci bot added kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 5, 2025
Copy link
Contributor

openshift-ci bot commented Oct 5, 2025

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 5, 2025
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 37.20930% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.97%. Comparing base (7a2820a) to head (a0408f0).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9499      +/-   ##
==========================================
- Coverage   67.04%   66.97%   -0.08%     
==========================================
  Files         202      202              
  Lines       28159    28255      +96     
==========================================
+ Hits        18880    18924      +44     
- Misses       7702     7739      +37     
- Partials     1577     1592      +15     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@snir911 snir911 marked this pull request as ready for review October 9, 2025 10:33
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and QiWang19 October 9, 2025 10:33
@fidencio
Copy link
Contributor

fidencio commented Oct 9, 2025

@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.

@snir911
Copy link
Contributor Author

snir911 commented Oct 9, 2025

That's right, I'll mention it, thanks @fidencio !

Copy link
Contributor

@littlejawa littlejawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @snir911 !

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2025
Copy link
Contributor

openshift-ci bot commented Oct 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: littlejawa, snir911
Once this PR has been reviewed and has the lgtm label, please assign mrunalp for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make ContainerCreateTimeout configurable
3 participants