Skip to content

[release-1.33] OCPBUGS-82143: oci: wait for exit file before defaulting to exit code 255#9932

Merged
openshift-merge-bot[bot] merged 1 commit into
cri-o:release-1.33from
openshift-cherrypick-robot:cherry-pick-9879-to-release-1.33
May 18, 2026
Merged

[release-1.33] OCPBUGS-82143: oci: wait for exit file before defaulting to exit code 255#9932
openshift-merge-bot[bot] merged 1 commit into
cri-o:release-1.33from
openshift-cherrypick-robot:cherry-pick-9879-to-release-1.33

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #9879

/assign openshift-cherrypick-robot

Fixed the race condition where cri-o reports exitCode 255 when the container exits fast.

When a container exits very quickly, the OCI runtime may clean
up its state before CRI-O queries it. In this case, runtimeCmd("state")
fails and CRI-O falls back to reading the exit file. However, conmon
may not have written the exit file yet, causing CRI-O to immediately
default to exit code 255 with no retry.

Extract the existing exponential backoff wait for the exit file into a
shared waitForExitFile() function and use it in both code paths:
- Path A: when runtimeCmd("state") fails and the exit file is missing
- Path B: when runtimeCmd("state") reports the container as stopped

This ensures fast-exiting containers get the correct exit code from
conmon's exit file instead of a spurious 255.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Ayato Tokubi <atokubi@redhat.com>
@openshift-ci openshift-ci Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Could not make automatic cherrypick of Jira Issue OCPBUGS-82142 for this PR as the target version is not set for this branch in the jira plugin config. Running refresh:
/jira refresh

Details

In response to this:

This is an automated cherry-pick of #9879

/assign openshift-cherrypick-robot

Fixed the race condition where cri-o reports exitCode 255 when the container exits fast.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label May 6, 2026
@openshift-ci openshift-ci Bot requested review from QiWang19 and hasan4791 May 6, 2026 19:45
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87cd3e9e-96ce-4201-8e87-0858a2e1810f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-ci-robot: This pull request references Jira Issue OCPBUGS-82142, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

@openshift-cherrypick-robot: Could not make automatic cherrypick of Jira Issue OCPBUGS-82142 for this PR as the target version is not set for this branch in the jira plugin config. Running refresh:
/jira refresh

In response to this:

This is an automated cherry-pick of #9879

/assign openshift-cherrypick-robot

Fixed the race condition where cri-o reports exitCode 255 when the container exits fast.

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 openshift-eng/jira-lifecycle-plugin repository.

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 openshift-eng/jira-lifecycle-plugin repository.

@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.79%. Comparing base (f61007b) to head (5f8d734).
⚠️ Report is 2 commits behind head on release-1.33.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.33    #9932      +/-   ##
================================================
+ Coverage         49.56%   49.79%   +0.23%     
================================================
  Files               166      166              
  Lines             18441    18448       +7     
================================================
+ Hits               9140     9186      +46     
+ Misses             8161     8112      -49     
- Partials           1140     1150      +10     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bitoku bitoku self-assigned this May 7, 2026
@bitoku

bitoku commented May 7, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2026
@bitoku

bitoku commented May 18, 2026

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@bitoku: This pull request references Jira Issue OCPBUGS-82142, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku bitoku changed the title [release-1.33] OCPBUGS-82142: oci: wait for exit file before defaulting to exit code 255 [release-1.33] OCPBUGS-82143: oci: wait for exit file before defaulting to exit code 255 May 18, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 18, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-82143, which is valid. The bug has been moved to the POST state.

5 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-82142 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • bug has dependents

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #9879

/assign openshift-cherrypick-robot

Fixed the race condition where cri-o reports exitCode 255 when the container exits fast.

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku

bitoku commented May 18, 2026

Copy link
Copy Markdown
Contributor

@cri-o/cri-o-maintainers PTAL

@openshift-ci

openshift-ci Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 64c6a00 into cri-o:release-1.33 May 18, 2026
44 of 56 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Jira Issue OCPBUGS-82143: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-82143 has been moved to the MODIFIED state.

Details

In response to this:

This is an automated cherry-pick of #9879

/assign openshift-cherrypick-robot

Fixed the race condition where cri-o reports exitCode 255 when the container exits fast.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: The following test 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/e2e-aws-ovn 5f8d734 link unknown /test e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. 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.

4 participants