Skip to content

Conversation

littlejawa
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

This is a cherry-pick of #9433

This commit implements the ReopenContainerLog function. This fixes an issue where kata container logs could not be rotated.

This required duplicating part of the createContainerIO function, so I am moving this in its own subfunction for reuse.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix log rotation not working for containers running with the kata-containers runtime

This commit implements the ReopenContainerLog function.
This fixes an issue where kata container logs could not be rotated.

This required duplicating part of the createContainerIO function, so I am moving
this in its own subfunction for reuse.

Signed-off-by: Julien Ropé <jrope@redhat.com>
This commit adds a test that simulates log rotation, making sure
that the log file can be re-opened and used as expected.

Signed-off-by: Julien Ropé <jrope@redhat.com>
@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. kind/bug Categorizes issue or PR as related to a bug. labels Sep 4, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and QiWang19 September 4, 2025 07:49
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2025
Copy link
Contributor

openshift-ci bot commented Sep 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: littlejawa, saschagrunert

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2025
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 0% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.90%. Comparing base (60c6d8d) to head (5f6a627).
⚠️ Report is 3 commits behind head on release-1.33.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.33    #9452      +/-   ##
================================================
- Coverage         47.95%   47.90%   -0.05%     
================================================
  Files               164      164              
  Lines             24180    24204      +24     
================================================
  Hits              11596    11596              
- Misses            11439    11463      +24     
  Partials           1145     1145              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-merge-bot openshift-merge-bot bot merged commit 4d2f569 into cri-o:release-1.33 Sep 4, 2025
53 of 55 checks passed
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. kind/bug Categorizes issue or PR as related to a bug. 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.

2 participants