Skip to content

Conversation

sohankunkerkar
Copy link
Member

This fix leverages CNI cache files to retrieve network attachments and call CNI DEL when network namespace files are missing, preventing IP address leaks.

What type of PR is this?

/kind bug

What this PR does / why we need it:

This will fix the issue mentioned in #9301 (comment)

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

server: ensure CNI teardown prevents IP leaks with missing netns

@sohankunkerkar sohankunkerkar requested a review from mrunalp as a code owner July 31, 2025 14:11
@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 Jul 31, 2025
@sohankunkerkar
Copy link
Member Author

@danwinship could you PTAL?

@openshift-ci openshift-ci bot requested review from hasan4791 and klihub July 31, 2025 14:11
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2025
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 63.33333% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.30%. Comparing base (17c08c8) to head (e1bf924).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9372      +/-   ##
==========================================
+ Coverage   67.17%   67.30%   +0.13%     
==========================================
  Files         200      200              
  Lines       27680    27702      +22     
==========================================
+ Hits        18595    18646      +51     
+ Misses       7540     7510      -30     
- Partials     1545     1546       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sohankunkerkar
Copy link
Member Author

https://github.com/cri-o/cri-o/actions/runs/16651679437/job/47126005482?pr=9372
This fix ensures CNI teardown is always called to prevent IP leaks, even when network namespaces are invalid/missing. However, this causes the above test to fail when the CNI plugin is temporarily unavailable (it looks like we need to fix the test?)

@sohankunkerkar sohankunkerkar force-pushed the fix-ip-leaks branch 3 times, most recently from e837b67 to c354bd9 Compare July 31, 2025 19:33
@sohankunkerkar
Copy link
Member Author

@cri-o/cri-o-maintainers PTAL

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, otherwise LGTM.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2025
Copy link
Contributor

openshift-ci bot commented Aug 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [saschagrunert,sohankunkerkar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit a9243f9 into cri-o:main Aug 5, 2025
73 of 74 checks passed
@sohankunkerkar
Copy link
Member Author

/cherry-pick release-1.33

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #9382

In response to this:

/cherry-pick 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. 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.

4 participants