Skip to content

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #9223

/assign haircommander

This commit introduces a new `housekeeping` value for the `irq-load-balancing.crio.io` annotation.

When `housekeeping` is set:
* The housekeeping CPU set is injected into the container's environment variables as `OPENSHIFT_HOUSEKEEPING_CPUS`
* IRQ SMP affinity bits are not disabled on the housekeeping CPUs when adding a new container
* The housekeeping CPUs are chosen as the first CPU within each container plus its thread siblings

The Generator struct contains an internal envMap field that caches
environment variable positions for performance optimization when adding
environment variables. This map is critical for the proper operation of
the AddProcessEnv() and AddMultipleProcessEnv() methods, which rely on
it to efficiently detect and update duplicate environment variables.

The previous code directly instantiated a Generator struct literal,
which leaves the envMap field as nil (the zero value for maps in Go).
When methods like AddProcessEnv() are subsequently called, they attempt
to access g.envMap[key], which will work on a nil map for reads but
creates a bug: the code path at line 543 tries to assign to g.envMap,
which will panic with "assignment to entry in nil map".

While the current code path in createContainerPlatform() doesn't
immediately call methods that would trigger this panic, the bug
represents a latent defect that could cause runtime panics if future
changes call environment variable manipulation methods on this Generator
instance.

Signed-off-by: Andreas Karis <[email protected]>
Add support for the "housekeeping" annotation value in the IRQ load
balancing feature. When irq-load-balancing.crio.io is set to "housekeeping",
IRQ interrupts are preserved on the first CPU and its thread siblings,
while being disabled on the remaining container CPUs.
The implementation also injects environment variable HOUSEKEEPING_CPUS into
containers.

Signed-off-by: Andreas Karis <[email protected]>
Add a nil pointer check in isContainerRequestWholeCPU, just for safety
measures, as the cSpec or several of the fields might be nil.

Signed-off-by: Andreas Karis <[email protected]>
@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 Nov 3, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and klihub November 3, 2025 14:08
@haircommander
Copy link
Member

@cri-o/cri-o-maintainers PTAL

@MarSik
Copy link
Contributor

MarSik commented Nov 3, 2025

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2025

@MarSik: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

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.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 59.09091% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.19%. Comparing base (5780ac7) to head (7004fa6).
⚠️ Report is 6 commits behind head on release-1.34.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.34    #9564      +/-   ##
================================================
- Coverage         67.03%   64.19%   -2.84%     
================================================
  Files               202      202              
  Lines             28085    28164      +79     
================================================
- Hits              18827    18081     -746     
- Misses             7683     8495     +812     
- Partials           1575     1588      +13     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haircommander
Copy link
Member

/retest
/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2025

[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 Nov 11, 2025
@haircommander
Copy link
Member

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 1926694 into cri-o:release-1.34 Nov 12, 2025
70 of 73 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. 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