+
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?

Added `container_create_timeout` option to control timeout duration of container creation

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 35.55556% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.54%. Comparing base (6e79482) to head (ea5fe0d).
⚠️ Report is 17 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (6e79482) and HEAD (ea5fe0d). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (6e79482) HEAD (ea5fe0d)
15 11
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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@snir911 snir911 force-pushed the 9151 branch 2 times, most recently from f74dbd0 to a0408f0 Compare October 9, 2025 09:13
@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 QiWang19 and hasan4791 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

@bitoku
Copy link
Contributor

bitoku commented Oct 10, 2025

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 10, 2025
@bitoku
Copy link
Contributor

bitoku commented Oct 10, 2025

/release-note-edit

Added `container_create_timeout` option to control timeout duration of container creation

Copy link
Contributor

openshift-ci bot commented Oct 10, 2025

@bitoku: /release-note-edit must be used with a single release note block.

In response to this:

/release-note-edit

Added `container_create_timeout` option to control timeout duration of container creation

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed 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 10, 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.

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>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2025
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

New changes are detected. LGTM label has been removed.

@snir911 snir911 requested a review from bitoku October 15, 2025 13:49
Copy link
Contributor

@bitoku bitoku left a 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
Copy link
Contributor

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

Copy link
Contributor

@bitoku bitoku Oct 17, 2025

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>
Copy link
Contributor

openshift-ci bot commented Oct 19, 2025

@snir911: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-fedora-kata 3a9f331 link true /test ci-fedora-kata
ci/prow/ci-cgroupv2-integration ea5fe0d link true /test ci-cgroupv2-integration
ci/prow/ci-fedora-integration ea5fe0d link true /test ci-fedora-integration

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.

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. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make ContainerCreateTimeout configurable

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载