Skip to content

OCPCLOUD-2992: migration e2e for deleting machine with authoritativeAPI ClusterAPI #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huali9
Copy link
Contributor

@huali9 huali9 commented Aug 18, 2025

Works well in local @miyadav @sunzhaohua2 @shellyyang1989 @damdo PTAL, thanks!

liuhuali@Lius-MacBook-Pro cluster-capi-operator % go run ./vendor/github.com/onsi/ginkgo/v2/ginkgo -v --focus="Deleting MAPI/CAPI Machines" ./e2e/...
2025/08/18 12:56:56 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined
Running Suite: Cluster API Suite - /Users/liuhuali/project/cluster-capi-operator/e2e
====================================================================================
Random Seed: 1755493016

Will run 6 of 38 specs
------------------------------
[BeforeSuite] 
/Users/liuhuali/project/cluster-capi-operator/e2e/e2e_test.go:59
[BeforeSuite] PASSED [2.008 seconds]
------------------------------
SSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration Tests Create MAPI MachineSets with spec.authoritativeAPI: MAPI and existing CAPI MachineSet with same name should reject creation of MAPI MachineSet with same name as existing CAPI MachineSet
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_test.go:75
------------------------------
SSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration Tests Create MAPI MachineSets with spec.authoritativeAPI: CAPI and existing CAPI MachineSet with same name should verify that the non-authoritative MAPI MachineSet providerSpec has been updated to reflect the authoritative CAPI MachineSet mirror values
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_test.go:159
------------------------------
SSSSSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Create MAPI Machine with spec.authoritativeAPI: ClusterAPI and already existing CAPI Machine with same name should verify MAPI Machine Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:62
------------------------------
SSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Create MAPI Machine with spec.authoritativeAPI: ClusterAPI and no existing CAPI Machine with same name should verify MAPI Machine Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:96
------------------------------
SSS
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should delete MAPI Machine works
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:138
  STEP: Using MAPI machine huliu-aws818a-sgmfx-worker-us-east-2a-v8n26 as a reference @ 08/18/25 12:57:08.161
  STEP: Creating a new MAPI machine with AuthoritativeAPI: ClusterAPI in namespace: openshift-machine-api @ 08/18/25 12:57:08.161
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:08.46
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:18.744
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:29.027
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:39.311
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:49.593
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:59.876
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:10.164
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:20.456
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:30.739
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:41.022
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:51.322
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:01.605
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:11.887
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:22.173
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:32.461
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:42.808
  STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:53.091
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:03.372
• [219.272 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should verify the CAPI machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:143
  STEP: Verifying the CAPI Machine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:00:46.537
• [0.307 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should verify the AWS machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:146
  STEP: Verifying the AWSMachine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:00:46.844
  STEP: Cleaning up machine resources @ 08/18/25 13:00:47.133
  STEP: Deleting MAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:00:47.133
E0818 13:00:47.457118   11890 machines.go:140] Error querying api for machine object "machine-authoritativeapi-capi-deletion": machines.machine.openshift.io "machine-authoritativeapi-capi-deletion" not found, retrying...
• [0.920 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should delete CAPI Machine works
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:169
  STEP: Using MAPI machine huliu-aws818a-sgmfx-worker-us-east-2a-v8n26 as a reference @ 08/18/25 13:00:48.329
  STEP: Creating a new MAPI machine with AuthoritativeAPI: ClusterAPI in namespace: openshift-machine-api @ 08/18/25 13:00:48.33
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:48.682
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:58.962
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:09.325
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:19.668
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:29.949
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:40.28
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:50.561
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:00.843
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:11.171
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:21.456
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:31.755
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:42.205
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:52.501
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:02.783
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:13.123
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:23.411
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:33.693
  STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:43.991
• [249.609 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should verify the MAPI machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:173
  STEP: Verifying the MAPI Machine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:04:57.355
• [0.355 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should verify the AWS machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:176
  STEP: Verifying the AWSMachine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:04:57.71
  STEP: Cleaning up machine resources @ 08/18/25 13:04:57.988
  STEP: Deleting CAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:04:57.988
  STEP: Deleting MAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:04:58.549
E0818 13:04:58.830879   11890 machines.go:140] Error querying api for machine object "machine-authoritativeapi-capi-deletion": machines.machine.openshift.io "machine-authoritativeapi-capi-deletion" not found, retrying...
• [1.402 seconds]
------------------------------

Ran 6 of 38 Specs in 473.874 seconds
SUCCESS! -- 6 Passed | 0 Failed | 4 Pending | 28 Skipped
PASS

Ginkgo ran 1 suite in 8m2.230568089s
Test Suite Passed

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 18, 2025

@huali9: This pull request references OCPCLOUD-2992 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Works well in local @miyadav @sunzhaohua2 @shellyyang1989 @damdo PTAL, thanks!

liuhuali@Lius-MacBook-Pro cluster-capi-operator % go run ./vendor/github.com/onsi/ginkgo/v2/ginkgo -v --focus="Deleting MAPI/CAPI Machines" ./e2e/...
2025/08/18 12:56:56 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined
Running Suite: Cluster API Suite - /Users/liuhuali/project/cluster-capi-operator/e2e
====================================================================================
Random Seed: 1755493016

Will run 6 of 38 specs
------------------------------
[BeforeSuite] 
/Users/liuhuali/project/cluster-capi-operator/e2e/e2e_test.go:59
[BeforeSuite] PASSED [2.008 seconds]
------------------------------
SSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration Tests Create MAPI MachineSets with spec.authoritativeAPI: MAPI and existing CAPI MachineSet with same name should reject creation of MAPI MachineSet with same name as existing CAPI MachineSet
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_test.go:75
------------------------------
SSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration Tests Create MAPI MachineSets with spec.authoritativeAPI: CAPI and existing CAPI MachineSet with same name should verify that the non-authoritative MAPI MachineSet providerSpec has been updated to reflect the authoritative CAPI MachineSet mirror values
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_test.go:159
------------------------------
SSSSSSSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Create MAPI Machine with spec.authoritativeAPI: ClusterAPI and already existing CAPI Machine with same name should verify MAPI Machine Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:62
------------------------------
SSSS
P [PENDING]
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Create MAPI Machine with spec.authoritativeAPI: ClusterAPI and no existing CAPI Machine with same name should verify MAPI Machine Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:96
------------------------------
SSS
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should delete MAPI Machine works
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:138
 STEP: Using MAPI machine huliu-aws818a-sgmfx-worker-us-east-2a-v8n26 as a reference @ 08/18/25 12:57:08.161
 STEP: Creating a new MAPI machine with AuthoritativeAPI: ClusterAPI in namespace: openshift-machine-api @ 08/18/25 12:57:08.161
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:08.46
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:18.744
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:29.027
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:39.311
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:49.593
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:57:59.876
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:10.164
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:20.456
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:30.739
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:41.022
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:58:51.322
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:01.605
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:11.887
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:22.173
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:32.461
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:42.808
 STEP: Verify the CAPI Machine is Running @ 08/18/25 12:59:53.091
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:03.372
• [219.272 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should verify the CAPI machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:143
 STEP: Verifying the CAPI Machine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:00:46.537
• [0.307 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete MAPI machine should verify the AWS machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:146
 STEP: Verifying the AWSMachine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:00:46.844
 STEP: Cleaning up machine resources @ 08/18/25 13:00:47.133
 STEP: Deleting MAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:00:47.133
E0818 13:00:47.457118   11890 machines.go:140] Error querying api for machine object "machine-authoritativeapi-capi-deletion": machines.machine.openshift.io "machine-authoritativeapi-capi-deletion" not found, retrying...
• [0.920 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should delete CAPI Machine works
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:169
 STEP: Using MAPI machine huliu-aws818a-sgmfx-worker-us-east-2a-v8n26 as a reference @ 08/18/25 13:00:48.329
 STEP: Creating a new MAPI machine with AuthoritativeAPI: ClusterAPI in namespace: openshift-machine-api @ 08/18/25 13:00:48.33
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:48.682
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:00:58.962
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:09.325
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:19.668
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:29.949
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:40.28
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:01:50.561
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:00.843
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:11.171
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:21.456
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:31.755
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:42.205
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:02:52.501
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:02.783
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:13.123
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:23.411
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:33.693
 STEP: Verify the CAPI Machine is Running @ 08/18/25 13:03:43.991
• [249.609 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should verify the MAPI machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:173
 STEP: Verifying the MAPI Machine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:04:57.355
• [0.355 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] Machine Migration Tests Deleting MAPI/CAPI Machines with spec.authoritativeAPI: ClusterAPI and delete CAPI machine should verify the AWS machine is deleted
/Users/liuhuali/project/cluster-capi-operator/e2e/machine_migration_test.go:176
 STEP: Verifying the AWSMachine machine-authoritativeapi-capi-deletion is removed @ 08/18/25 13:04:57.71
 STEP: Cleaning up machine resources @ 08/18/25 13:04:57.988
 STEP: Deleting CAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:04:57.988
 STEP: Deleting MAPI Machine machine-authoritativeapi-capi-deletion @ 08/18/25 13:04:58.549
E0818 13:04:58.830879   11890 machines.go:140] Error querying api for machine object "machine-authoritativeapi-capi-deletion": machines.machine.openshift.io "machine-authoritativeapi-capi-deletion" not found, retrying...
• [1.402 seconds]
------------------------------

Ran 6 of 38 Specs in 473.874 seconds
SUCCESS! -- 6 Passed | 0 Failed | 4 Pending | 28 Skipped
PASS

Ginkgo ran 1 suite in 8m2.230568089s
Test Suite Passed

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 openshift-ci bot requested review from nrb and racheljpg August 18, 2025 05:28
Copy link
Contributor

openshift-ci bot commented Aug 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@huali9
Copy link
Contributor Author

huali9 commented Aug 18, 2025

/test e2e-aws-ovn

@huali9
Copy link
Contributor Author

huali9 commented Aug 19, 2025

/retest-required

Copy link
Contributor

openshift-ci bot commented Aug 19, 2025

@huali9: 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/okd-scos-e2e-aws-ovn e5d296f link false /test okd-scos-e2e-aws-ovn
ci/prow/regression-clusterinfra-aws-ipi-techpreview-capi e5d296f link false /test regression-clusterinfra-aws-ipi-techpreview-capi
ci/prow/e2e-aws-ovn e5d296f link true /test e2e-aws-ovn

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.

2 participants