Skip to content

e2e: serial: Test for performance profile update and NRT reconciliation #1255

Open
SargunNarula wants to merge 1 commit into
openshift-kni:mainfrom
SargunNarula:pp_hcp_test
Open

e2e: serial: Test for performance profile update and NRT reconciliation #1255
SargunNarula wants to merge 1 commit into
openshift-kni:mainfrom
SargunNarula:pp_hcp_test

Conversation

@SargunNarula
Copy link
Copy Markdown
Contributor

This PR implements the test for the performance profile update over the management cluster and verifies the NRT objects reconciliation with the updated changes on the hosted cluster.

@openshift-ci openshift-ci Bot requested review from mrniranjan and shajmakh April 11, 2025 12:25
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 11, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: SargunNarula
Once this PR has been reviewed and has the lgtm label, please assign mrniranjan 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

Copy link
Copy Markdown
Member

@shajmakh shajmakh left a comment

Choose a reason for hiding this comment

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

Thanks! below is the initial review

Comment thread test/e2e/serial/tests/configuration.go Outdated
Comment thread test/e2e/serial/tests/configuration.go Outdated
Comment thread test/e2e/serial/tests/configuration.go Outdated
Comment thread test/e2e/serial/tests/configuration.go Outdated
newTMPolicy := getNewTopologyManagerPolicyValue(initialTMPolicy)
Expect(initialTMPolicy).ToNot(Equal(newTMPolicy), "new TM policy should differ from the initial one")

By("retrieving the PerformanceProfile configmap from the management cluster")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we need to do extra verification layer before, how do you know if the configmap is for the PP ? and whether NROP is using PP config or kubeletconfig?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the ConfigMap is retrieved from the tuningConfig field under the NodePool spec, it effectively serves as the source of the PerformanceProfile configuration. In the NROP-HCP environment, there is no separate KubeletConfig as far as I’m aware. On the hosted cluster, the KubeletConfig ConfigMap is generated by the HyperShift operator and is marked as immutable: true.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so is performance-profile is a must in HCP? what is the user want to do kubeletchanges but not involve PP? can't this just be done via kubeletconfig like in OCP?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2025
@SargunNarula
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread test/e2e/serial/tests/configuration.go Outdated
Expect(modifiedYaml).ToNot(Equal(yamlData), "no changes applied to ConfigMap YAML")

targetCM.Data["tuning"] = modifiedYaml
err = e2eclient.MNGClient.Update(context.TODO(), targetCM)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I'm correct the reboot should happen on the update, where are we waiting for reboot?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, the node reboots on a PerformanceProfile update, but we don’t wait for the reboot explicitly. Since NRT relies on the RTE DaemonSet, and RTE pods are recreated only after the node becomes Ready, waiting for the updated NRT implicitly covers the reboot. Please let me know if I’ve misunderstood anything here.

Copy link
Copy Markdown
Collaborator

@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.

I didn't went fully into reviewing the code itself, but there's an hidden assumption here, which is that a performance profile is available for the test.

This is not always the case because one can create a kubeletconfig directly.
The only valid assumption is that we have a kubeleconfig available, not a performance profile.

…reconciliation

Signed-off-by: Sargun Narula <snarula@redhat.com>
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 9, 2025

@SargunNarula: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-unit 71d0434 link true /test ci-unit
ci/prow/ci-install-e2e 71d0434 link true /test ci-install-e2e
ci/prow/ci-e2e-install-hypershift 71d0434 link true /test ci-e2e-install-hypershift
ci/prow/ci-must-gather-e2e 71d0434 link true /test ci-must-gather-e2e
ci/prow/ci-e2e 71d0434 link true /test ci-e2e

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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 18, 2026

PR needs rebase.

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.

Copy link
Copy Markdown
Collaborator

@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.

LGTM overall.
Please rebase if still relevant.

return ret
}

func getNewTopologyManagerPolicyValue(oldTopologyManagerPolicyValue string) string {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would rename it getDifferentTopologyManagerPolicyFrom(oldTopologyManagerPolicy string) string

sampleNode corev1.Node
}

type Tuning struct {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Worth checking if we already importing hypershift APIs

Expect(schedOK).To(BeTrue(), "pod %s/%s not scheduled with expected scheduler %s", updatedPod.Namespace, updatedPod.Name, serialconfig.SchedulerTestName)
})

It("[test_id:80821] Verify Performance Profile updates on management cluster reflect in NRT resources", Label("reboot_required", label.Slow, label.HyperShift), func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we don't have the dependencies for NTO here, In the serial suite we've added a while ago a dynamicClient to get the performanceprofile. It's being used here
It's possible this test can use that.

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

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants