Skip to content

Conversation

@mrniranjan
Copy link
Contributor

@mrniranjan mrniranjan commented Jan 17, 2026

Adds tests related to Odd integer cpu alignment
with full-pcpus-only: false

Assisted-by: Cursor v2.1.39
AI Attribution: AIA PAI Hin v1.0 Model: Auto

@openshift-ci openshift-ci bot requested review from Tal-or and ffromani January 17, 2026 07:04
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mrniranjan
Once this PR has been reviewed and has the lgtm label, please assign marsik for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Adds tests related to Odd integer cpu alignment
with full-pcpus-only: false

Assisted-by: Cursor v2.1.39
AI Attribution: AIA PAI Hin v1.0

Signed-off-by: Niranjan M.R <mniranja@redhat.com>
@mrniranjan mrniranjan changed the title AA: E2E: LLC: Add tests related to odd cpus OCPBUGS-74027: AA: E2E: LLC: Add tests related to odd cpus Jan 17, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jan 17, 2026
@openshift-ci-robot
Copy link
Contributor

@mrniranjan: This pull request references Jira Issue OCPBUGS-74027, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mrniranjan

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Adds tests related to Odd integer cpu alignment
with full-pcpus-only: false

Assisted-by: Cursor v2.1.39
AI Attribution: AIA PAI Hin v1.0 Model: Auto

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
Copy link
Contributor

openshift-ci bot commented Jan 17, 2026

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: mrniranjan.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

@mrniranjan: This pull request references Jira Issue OCPBUGS-74027, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mrniranjan

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Adds tests related to Odd integer cpu alignment
with full-pcpus-only: false

Assisted-by: Cursor v2.1.39
AI Attribution: AIA PAI Hin v1.0 Model: Auto

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 kubernetes-sigs/prow repository.

@mrniranjan
Copy link
Contributor Author

/retest

Copy link
Contributor

@Tal-or Tal-or left a comment

Choose a reason for hiding this comment

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

overall looking good.
few comments inside

// Restore original policy with full-pcpus-only: true
perfProfile, err := profiles.GetByNodeLabels(testutils.NodeSelectorLabels)
Expect(err).ToNot(HaveOccurred())
prof := perfProfile.DeepCopy()
Copy link
Contributor

Choose a reason for hiding this comment

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

We already DeepCopy the original profile in the BeforeAll we can use it for the revert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in latest commit

testlog.TaggedInfof("Pod", "CPUs used by %q are: %q (requested: %d)", testpod.Name, podCpuset.String(), requestedCPUs)

// Verify the pod got exactly the requested number of CPUs
Expect(podCpuset.Size()).To(Equal(requestedCPUs), "Pod should have exactly %d CPUs, got %d", requestedCPUs, podCpuset.Size())
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: checking that we got the exact number of requested cpus is basically checking the kubelet core basic logic.
I would say it's redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in latest commit

testlog.TaggedInfof("Pod", "CPUs used by %q are: %q (requested: %d)", testpod.Name, podCpuset.String(), requestedCPUs)

// Verify the pod got exactly the requested number of CPUs
Expect(podCpuset.Size()).To(Equal(requestedCPUs), "Pod should have exactly %d CPUs, got %d", requestedCPUs, podCpuset.Size())
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in latest commit

Signed-off-by: Niranjan M.R <mniranja@redhat.com>
Copy link
Contributor

@ffromani ffromani left a comment

Choose a reason for hiding this comment

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

the general direction looks OK, will have a final pass once the minorish inline comments are addressed

llcPolicyOddCPUs := `{"cpuManagerPolicyOptions":{"prefer-align-cpus-by-uncorecache":"true", "full-pcpus-only":"false"}}`
perfProfile, err := profiles.GetByNodeLabels(testutils.NodeSelectorLabels)
Expect(err).ToNot(HaveOccurred())
initialProfile = perfProfile.DeepCopy()
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to use the top-level initial profile or do we want to add a more localized variable?
I'm slightly leaning towards the latter but I don't really have strong preferences

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in latest commit

Comment on lines 845 to 858
BeforeEach(func() {
hasBaremetal := false
for i := range workerRTNodes {
isVM, err := infrastructure.IsVM(context.Background(), &workerRTNodes[i])
Expect(err).ToNot(HaveOccurred())
if !isVM {
hasBaremetal = true
break
}
}
if !hasBaremetal {
Skip("Skipping test. All workers in this test setup are VMs, no baremetal node was found")
}
})
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably be the first thing we do in BeforeAll. Furthermore, this checks we have at least 1 BM worker. Would it be useful to track and only use the BM workers later on?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in latest commit


It("[test_id:87072] Odd integer CPU request: 3 CPUs should prefer whole cores", func(ctx context.Context) {
requestedCPUs := 3
targetNode := workerRTNodes[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

this picks a random worker node. Which is ok, as long as we pick a random worker node among the BM ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test will exclusively run on Hardware that supports Uncore Cache . And typically in our downstream CI we label worker-cnf only to those nodes that support this feature

Signed-off-by: Niranjan M.R <mniranja@redhat.com>
@mrniranjan
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

@mrniranjan: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants