Skip to content

Add test case: CPMS interaction with automatic skew#5661

Open
sergiordlr wants to merge 1 commit intoopenshift:mainfrom
sergiordlr:add_cpms_test_for_automatic_skew
Open

Add test case: CPMS interaction with automatic skew#5661
sergiordlr wants to merge 1 commit intoopenshift:mainfrom
sergiordlr:add_cpms_test_for_automatic_skew

Conversation

@sergiordlr
Copy link
Contributor

@sergiordlr sergiordlr commented Feb 13, 2026

- What I did
Add test for CRD validation changes from openshift/api#2648: when skew enforcement is in Automatic mode, CPMS managers are permitted without requiring a MachineSet manager, and any MachineSet manager present must use selection mode All.

- How to verify it
Test should pass

Test execution log (AWS cluster, all 5 sub-cases passed)
I0213 16:04:08.337923 1560940 test_context.go:567] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite:  - /home/fedora/Workspace/machine-config-operator
================================================================
Random Seed: 1770998648 - will randomize all specs

Will run 1 of 1 specs
------------------------------
[sig-mco][Suite:openshift/machine-config-operator/disruptive][Serial][Disruptive][OCPFeatureGate:BootImageSkewEnforcement] Verify Automatic mode permits other machine managers [apigroup:machineconfiguration.openshift.io] [Platform:aws, Platform:gce]
/home/fedora/Workspace/machine-config-operator/test/extended-priv/mco_bootimages_skew.go:179
  STEP: Creating a kubernetes client @ 02/13/26 16:04:08.338
I0213 16:04:08.685658 1560940 client.go:164] configPath is now "/tmp/configfile3631539511"
I0213 16:04:08.685698 1560940 client.go:291] The user is now "e2e-test-mco-bootimage-nc8zg-user"
I0213 16:04:08.685708 1560940 client.go:293] Creating project "e2e-test-mco-bootimage-nc8zg"
I0213 16:04:08.794387 1560940 client.go:302] Waiting on permissions in project "e2e-test-mco-bootimage-nc8zg" ...
I0213 16:04:08.950037 1560940 client.go:363] Waiting for ServiceAccount "default" to be provisioned...
I0213 16:04:09.091128 1560940 client.go:363] Waiting for ServiceAccount "builder" to be provisioned...
I0213 16:04:09.231622 1560940 client.go:363] Waiting for ServiceAccount "deployer" to be provisioned...
I0213 16:04:09.372339 1560940 client.go:373] Waiting for RoleBinding "system:image-builders" to be provisioned...
I0213 16:04:09.447525 1560940 client.go:373] Waiting for RoleBinding "system:deployers" to be provisioned...
I0213 16:04:09.522895 1560940 client.go:373] Waiting for RoleBinding "system:image-pullers" to be provisioned...
I0213 16:04:09.597791 1560940 client.go:404] Project "e2e-test-mco-bootimage-nc8zg" has been fully provisioned.
I0213 16:04:09.597879 1560940 client.go:718] Running 'oc get infrastructure cluster -o=jsonpath={.status.platformStatus.controlPlaneTopology}'
I0213 16:04:09.819242 1560940 client.go:718] Running 'oc get machineconfiguration cluster -o jsonpath={.spec}'
I0213 16:04:10.037859 1560940 client.go:718] Running 'oc get infrastructure cluster -o=jsonpath={.status.platformStatus.type}'
Feb 13 16:04:10.247: INFO: Removing .spec.bootImageSkewEnforcement from <Kind: machineconfiguration, Name: cluster, Namespace: >
I0213 16:04:10.248017 1560940 client.go:718] Running 'oc get machineconfiguration cluster -o jsonpath={.spec.bootImageSkewEnforcement}'
Feb 13 16:04:10.471: INFO: .spec.bootImageSkewEnforcement does not exist. No need to remove it
I0213 16:04:10.471874 1560940 client.go:718] Running 'oc get machineconfiguration cluster -o jsonpath={.status.bootImageSkewEnforcementStatus.mode}'
Feb 13 16:04:10.693: INFO: CPMS-only with All mode should succeed
I0213 16:04:10.693362 1560940 client.go:718] Running 'oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"All"}}]}}}'
Feb 13 16:04:10.967: INFO: OK!

Feb 13 16:04:10.967: INFO: CPMS-only with None mode should succeed
I0213 16:04:10.968029 1560940 client.go:718] Running 'oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}}]}}}'
Feb 13 16:04:11.290: INFO: OK!

Feb 13 16:04:11.290: INFO: CPMS All + MachineSet All should succeed
I0213 16:04:11.290835 1560940 client.go:718] Running 'oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"All"}},{"resource":"machinesets","apiGroup":"machine.openshift.io","selection":{"mode":"All"}}]}}}'
Feb 13 16:04:11.563: INFO: OK!

Feb 13 16:04:11.563: INFO: CPMS All + MachineSet None should fail
I0213 16:04:11.563525 1560940 client.go:718] Running 'oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"All"}},{"resource":"machinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}}]}}}'
I0213 16:04:11.823265 1560940 client.go:727] Error running oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"All"}},{"resource":"machinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}}]}}}:
The MachineConfiguration "cluster" is invalid: <nil>: Invalid value: "object": when skew enforcement is in Automatic mode, any MachineAPI MachineSet MachineManager must use selection mode 'All'
Feb 13 16:04:11.823: ERROR: exit status 1
Feb 13 16:04:11.823: INFO: OK!

Feb 13 16:04:11.823: INFO: CPMS None + MachineSet None should fail
I0213 16:04:11.823379 1560940 client.go:718] Running 'oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}},{"resource":"machinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}}]}}}'
I0213 16:04:12.082851 1560940 client.go:727] Error running oc patch machineconfiguration cluster --type merge -p {"spec":{"managedBootImages":{"machineManagers":[{"resource":"controlplanemachinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}},{"resource":"machinesets","apiGroup":"machine.openshift.io","selection":{"mode":"None"}}]}}}:
The MachineConfiguration "cluster" is invalid: <nil>: Invalid value: "object": when skew enforcement is in Automatic mode, any MachineAPI MachineSet MachineManager must use selection mode 'All'
Feb 13 16:04:12.082: ERROR: exit status 1
Feb 13 16:04:12.082: INFO: OK!

  STEP: Restoring MachineConfiguration to original state @ 02/13/26 16:04:12.228
  STEP: Destroying namespace "e2e-test-mco-bootimage-nc8zg" for this suite. @ 02/13/26 16:04:12.5
• [4.206 seconds]
------------------------------

Ran 1 of 1 Specs in 4.206 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@sergiordlr sergiordlr force-pushed the add_cpms_test_for_automatic_skew branch from 78be062 to da48118 Compare February 13, 2026 17:01
@sergiordlr
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-1of2 #5583
/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-2of2 #5583
/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-1of2 #5583
/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-2of2 #5583

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: given command is invalid: at least one of the commands given is only supported on a one-command-per-comment basis, please separate out commands as multiple comments

@sergiordlr
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-1of2 #5583

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-1of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/feb7f4a0-08fe-11f1-91c3-92ac59a9c770-0

@sergiordlr
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-2of2 #5583

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-azure-mco-disruptive-techpreview-2of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/092c7ff0-08ff-11f1-80c1-cfb320f83b55-0

@sergiordlr
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-1of2 #5583

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-1of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/11adc6c0-08ff-11f1-9674-18e18d62b316-0

@sergiordlr
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-2of2 #5583

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-4.22-periodics-e2e-vsphere-mco-disruptive-techpreview-2of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/19223170-08ff-11f1-8891-966d4de86d98-0

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@sergiordlr: 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant