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 klihub September 4, 2025 07:43
@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
@littlejawa
Copy link
Contributor Author

/retest

Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 0% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.99%. Comparing base (6140265) to head (bca2999).
⚠️ Report is 3 commits behind head on release-1.32.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.32    #9451      +/-   ##
================================================
- Coverage         47.05%   46.99%   -0.06%     
================================================
  Files               155      155              
  Lines             22273    22298      +25     
================================================
  Hits              10480    10480              
- Misses            10718    10743      +25     
  Partials           1075     1075              
🚀 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 60d4e21 into cri-o:release-1.32 Sep 4, 2025
39 of 49 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