Skip to content

OCPBUGS-82142: [release-1.34] oci: wait for exit file before defaulting to exit code 255#9879

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

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

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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-robot

Copy link
Copy Markdown

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

/retitle [release-1.34] : : oci: wait for exit file before defaulting to exit code 255

Details

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 13, 2026
@coderabbitai

coderabbitai Bot commented Apr 13, 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: 7aa99ef2-6089-42ca-9f72-c67015af2045

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 openshift-ci Bot requested review from hasan4791 and littlejawa April 13, 2026 16:04
@openshift-ci openshift-ci Bot changed the title [release-1.34] OCPBUGS-82162: : oci: wait for exit file before defaulting to exit code 255 [release-1.34] : : oci: wait for exit file before defaulting to exit code 255 Apr 13, 2026
@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 Apr 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-ci-robot: This pull request references Jira Issue OCPBUGS-82162, 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-82162 for this PR as the target version is not set for this branch in the jira plugin config. Running refresh:
/jira refresh

/retitle [release-1.34] : : oci: wait for exit file before defaulting to exit code 255

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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.

@openshift-ci-robot openshift-ci-robot removed 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 Apr 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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 Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.86%. Comparing base (dd7d093) to head (dad7101).
⚠️ Report is 14 commits behind head on release-1.34.

Additional details and impacted files
@@                Coverage Diff                @@
##           release-1.34    #9879       +/-   ##
=================================================
+ Coverage         46.91%   64.86%   +17.95%     
=================================================
  Files               164      204       +40     
  Lines             25138    28853     +3715     
=================================================
+ Hits              11793    18716     +6923     
+ Misses            12183     8509     -3674     
- Partials           1162     1628      +466     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bitoku bitoku changed the title [release-1.34] : : oci: wait for exit file before defaulting to exit code 255 OCPBUGS-82142: [release-1.34] oci: wait for exit file before defaulting to exit code 255 Apr 14, 2026
@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 Apr 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown

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

  • expected dependent Jira Issue OCPBUGS-82162 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA 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:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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 closed this Apr 20, 2026
@bitoku bitoku reopened this Apr 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-82142. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

Details

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-82142, 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-82162 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 #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 20, 2026
@bitoku

bitoku commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@bitoku

bitoku commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

/retest

@bitoku bitoku self-assigned this Apr 28, 2026
@bitoku

bitoku commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

/retest

@bitoku

bitoku commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

/lgtm
@cri-o/cri-o-maintainers PTAL

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

bitoku commented May 5, 2026

Copy link
Copy Markdown
Contributor

@cri-o/cri-o-maintainers PTAL

@haircommander

Copy link
Copy Markdown
Member

/approve

@openshift-ci

openshift-ci Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 6, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 91b4b0b into cri-o:release-1.34 May 6, 2026
84 of 101 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

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

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

Details

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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-cherrypick-robot

Copy link
Copy Markdown
Author

@openshift-cherrypick-robot: new pull request created: #9932

Details

In response to this:

This is an automated cherry-pick of #9871

/assign openshift-cherrypick-robot

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

/cherrypick release-1.33

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.

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