Skip to content

Conversation

@ngopalak-redhat
Copy link
Contributor

@ngopalak-redhat ngopalak-redhat commented Nov 8, 2025

Summary

This PR introduces a new E2E test case to verify the behavior of the NODE_SIZING_ENABLED feature flag following the changes in openshift/machine-config-operator#5387. The primary goal is to ensure that while the patch introduces a new MachineConfig, it does not automatically disable a user's ability to enable node autosizing for reserved resources.

NOTE: maxRestartCountForFailures is measured over the ENTIRE test suite run, not at a fixed interval, For this test suite since the node restarts. The count is increased

Test Steps and Verification

The test case performs the following verifications:

Initial State Check:

A new MachineConfig (related to the patch) is applied.

The test then verifies that, by default, the /etc/node-sizing-enabled.env file on the host still contains NODE_SIZING_ENABLED=false.

Goal: Confirm the new MachineConfig does not inadvertently set this flag to true or prevent it from being set to false.

Enablement Check (Positive Verification):

A KubeletConfig resource is created to enable the auto-sizing reserved feature.

The test verifies that this action successfully overrides the default state and sets NODE_SIZING_ENABLED=true in the /etc/node-sizing-enabled.env file.

Goal: Ensure the MachineConfig patch does not block users from utilizing node autosizing when explicitly configured via KubeletConfig.

Implementation Details

The test utilizes a privileged pod to access the host filesystem (specifically /etc/node-sizing-enabled.env) to directly read the value of the NODE_SIZING_ENABLED environment variable before and after the KubeletConfig application.

This provides robust coverage to prevent a regression where the MCO patch could block or override user-configured autosizing.

Test Result with the PR: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/release-openshift-origin-installer-launch-aws-modern/1987358551382691840/artifacts/launch/openshift-e2e-test/artifacts/e2e.log
Run with clusterBot

test e2e-serial openshift/origin#30467,openshift/machine-config-operator#5387,4.20 aws

Result:

started: 0/60/82 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

passed: (12m44s) 2025-11-09T07:24:02 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

Also to add without the patch the test is passing, which implies that patch does not change the current behavior of 4.20:

passed: (12m39s) 2025-11-09T12:18:00 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 8, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 8, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@ngopalak-redhat
Copy link
Contributor Author

/test all

@ngopalak-redhat ngopalak-redhat changed the title WIP: Add a test for NodeSizing default change OCPNODE-3722: Add a test for NodeSizing default change to OCP 4.20 Nov 9, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 9, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 9, 2025

@ngopalak-redhat: This pull request references OCPNODE-3722 which is a valid jira issue.

In response to this:

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.

@ngopalak-redhat ngopalak-redhat changed the title OCPNODE-3722: Add a test for NodeSizing default change to OCP 4.20 [release-4.20] OCPNODE-3722: Add a test for NodeSizing default change to OCP 4.20 Nov 9, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 9, 2025

@ngopalak-redhat: This pull request references OCPNODE-3722 which is a valid jira issue.

In response to this:

Summary

This PR introduces a new E2E test case to verify the behavior of the NODE_SIZING_ENABLED feature flag following the changes in openshift/machine-config-operator#5387. The primary goal is to ensure that while the patch introduces a new MachineConfig, it does not automatically disable a user's ability to enable node autosizing for reserved resources.

Test Steps and Verification

The test case performs the following verifications:

Initial State Check:

A new MachineConfig (related to the patch) is applied.

The test then verifies that, by default, the /etc/node-sizing-enabled.env file on the host still contains NODE_SIZING_ENABLED=false.

Goal: Confirm the new MachineConfig does not inadvertently set this flag to true or prevent it from being set to false.

Enablement Check (Positive Verification):

A KubeletConfig resource is created to enable the auto-sizing reserved feature.

The test verifies that this action successfully overrides the default state and sets NODE_SIZING_ENABLED=true in the /etc/node-sizing-enabled.env file.

Goal: Ensure the MachineConfig patch does not block users from utilizing node autosizing when explicitly configured via KubeletConfig.

Implementation Details

The test utilizes a privileged pod to access the host filesystem (specifically /etc/node-sizing-enabled.env) to directly read the value of the NODE_SIZING_ENABLED environment variable before and after the KubeletConfig application.

This provides robust coverage to prevent a regression where the MCO patch could block or override user-configured autosizing.

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.

@ngopalak-redhat
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 9, 2025

@ngopalak-redhat: This pull request references OCPNODE-3722 which is a valid jira issue.

In response to this:

Summary

This PR introduces a new E2E test case to verify the behavior of the NODE_SIZING_ENABLED feature flag following the changes in openshift/machine-config-operator#5387. The primary goal is to ensure that while the patch introduces a new MachineConfig, it does not automatically disable a user's ability to enable node autosizing for reserved resources.

Test Steps and Verification

The test case performs the following verifications:

Initial State Check:

A new MachineConfig (related to the patch) is applied.

The test then verifies that, by default, the /etc/node-sizing-enabled.env file on the host still contains NODE_SIZING_ENABLED=false.

Goal: Confirm the new MachineConfig does not inadvertently set this flag to true or prevent it from being set to false.

Enablement Check (Positive Verification):

A KubeletConfig resource is created to enable the auto-sizing reserved feature.

The test verifies that this action successfully overrides the default state and sets NODE_SIZING_ENABLED=true in the /etc/node-sizing-enabled.env file.

Goal: Ensure the MachineConfig patch does not block users from utilizing node autosizing when explicitly configured via KubeletConfig.

Implementation Details

The test utilizes a privileged pod to access the host filesystem (specifically /etc/node-sizing-enabled.env) to directly read the value of the NODE_SIZING_ENABLED environment variable before and after the KubeletConfig application.

This provides robust coverage to prevent a regression where the MCO patch could block or override user-configured autosizing.

Test Result with the PR: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/release-openshift-origin-installer-launch-aws-modern/1987358551382691840/artifacts/launch/openshift-e2e-test/artifacts/e2e.log
Run with clusterBot

test e2e-serial openshift/origin#30467,openshift/machine-config-operator#5387,4.20 aws

Result:

started: 0/60/82 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

passed: (12m44s) 2025-11-09T07:24:02 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

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

openshift-ci-robot commented Nov 9, 2025

@ngopalak-redhat: This pull request references OCPNODE-3722 which is a valid jira issue.

In response to this:

Summary

This PR introduces a new E2E test case to verify the behavior of the NODE_SIZING_ENABLED feature flag following the changes in openshift/machine-config-operator#5387. The primary goal is to ensure that while the patch introduces a new MachineConfig, it does not automatically disable a user's ability to enable node autosizing for reserved resources.

Test Steps and Verification

The test case performs the following verifications:

Initial State Check:

A new MachineConfig (related to the patch) is applied.

The test then verifies that, by default, the /etc/node-sizing-enabled.env file on the host still contains NODE_SIZING_ENABLED=false.

Goal: Confirm the new MachineConfig does not inadvertently set this flag to true or prevent it from being set to false.

Enablement Check (Positive Verification):

A KubeletConfig resource is created to enable the auto-sizing reserved feature.

The test verifies that this action successfully overrides the default state and sets NODE_SIZING_ENABLED=true in the /etc/node-sizing-enabled.env file.

Goal: Ensure the MachineConfig patch does not block users from utilizing node autosizing when explicitly configured via KubeletConfig.

Implementation Details

The test utilizes a privileged pod to access the host filesystem (specifically /etc/node-sizing-enabled.env) to directly read the value of the NODE_SIZING_ENABLED environment variable before and after the KubeletConfig application.

This provides robust coverage to prevent a regression where the MCO patch could block or override user-configured autosizing.

Test Result with the PR: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/release-openshift-origin-installer-launch-aws-modern/1987358551382691840/artifacts/launch/openshift-e2e-test/artifacts/e2e.log
Run with clusterBot

test e2e-serial openshift/origin#30467,openshift/machine-config-operator#5387,4.20 aws

Result:

started: 0/60/82 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

passed: (12m44s) 2025-11-09T07:24:02 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

Also to add without the patch the test is passing, which implies that patch does not change the current behavior of 4.20:

passed: (12m39s) 2025-11-09T12:18:00 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

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.

@ngopalak-redhat ngopalak-redhat marked this pull request as ready for review November 9, 2025 14:47
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 9, 2025
@ngopalak-redhat
Copy link
Contributor Author

@haircommander @sairameshv Here's the test for OCP 4.20 for auto-sizing config. It needed not hold on the patch as it tests the existing behavior which the patch should not change.


g.By("Waiting for worker MCP to start updating")
o.Eventually(func() bool {
mcp, err := mcClient.MachineconfigurationV1().MachineConfigPools().Get(ctx, "worker", metav1.GetOptions{})
Copy link
Member

Choose a reason for hiding this comment

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

I think worker is too big of an MCP for this test. maybe create a new smaller MCP with one worker node, and only update that one?

g.By("Creating a second privileged pod with /etc mounted to verify KubeletConfig was applied")
podName = "node-sizing-autosizing-test"

pod = &corev1.Pod{
Copy link
Member

Choose a reason for hiding this comment

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

redefined?

Image: "registry.k8s.io/e2e-test-images/agnhost:2.53",
Command: []string{"/bin/sh", "-c", "sleep 300"},
SecurityContext: &corev1.SecurityContext{
Privileged: func() *bool { b := true; return &b }(),
Copy link
Member

Choose a reason for hiding this comment

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

ptr.To(true)

@ngopalak-redhat
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 13, 2025

@ngopalak-redhat: This pull request references OCPNODE-3722 which is a valid jira issue.

In response to this:

Summary

This PR introduces a new E2E test case to verify the behavior of the NODE_SIZING_ENABLED feature flag following the changes in openshift/machine-config-operator#5387. The primary goal is to ensure that while the patch introduces a new MachineConfig, it does not automatically disable a user's ability to enable node autosizing for reserved resources.

NOTE: maxRestartCountForFailures is measured over the ENTIRE test suite run, not at a fixed interval, For this test suite since the node restarts. The count is increased

Test Steps and Verification

The test case performs the following verifications:

Initial State Check:

A new MachineConfig (related to the patch) is applied.

The test then verifies that, by default, the /etc/node-sizing-enabled.env file on the host still contains NODE_SIZING_ENABLED=false.

Goal: Confirm the new MachineConfig does not inadvertently set this flag to true or prevent it from being set to false.

Enablement Check (Positive Verification):

A KubeletConfig resource is created to enable the auto-sizing reserved feature.

The test verifies that this action successfully overrides the default state and sets NODE_SIZING_ENABLED=true in the /etc/node-sizing-enabled.env file.

Goal: Ensure the MachineConfig patch does not block users from utilizing node autosizing when explicitly configured via KubeletConfig.

Implementation Details

The test utilizes a privileged pod to access the host filesystem (specifically /etc/node-sizing-enabled.env) to directly read the value of the NODE_SIZING_ENABLED environment variable before and after the KubeletConfig application.

This provides robust coverage to prevent a regression where the MCO patch could block or override user-configured autosizing.

Test Result with the PR: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/release-openshift-origin-installer-launch-aws-modern/1987358551382691840/artifacts/launch/openshift-e2e-test/artifacts/e2e.log
Run with clusterBot

test e2e-serial openshift/origin#30467,openshift/machine-config-operator#5387,4.20 aws

Result:

started: 0/60/82 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

passed: (12m44s) 2025-11-09T07:24:02 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

Also to add without the patch the test is passing, which implies that patch does not change the current behavior of 4.20:

passed: (12m39s) 2025-11-09T12:18:00 "[Suite:openshift/conformance/serial][Serial][sig-node] Node sizing should have NODE_SIZING_ENABLED=false by default and NODE_SIZING_ENABLED=true when KubeletConfig with autoSizingReserved=true is applied"

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.

@ngopalak-redhat ngopalak-redhat force-pushed the ngopalak/release-4.20-test branch from 01e35bc to e27355a Compare November 13, 2025 04:35
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 13, 2025

@ngopalak-redhat: all tests passed!

Full PR test history. Your PR dashboard.

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

3 participants