-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
4.20
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
Moderate
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
mapi machine with AuthoritativeAPI:MachineAPI created success when there is same name capi machine but should error and not be created according to the enhancement doc https://github.com/openshift/enhancements/blob/master/enhancements/machine-api/converting-machine-api-to-cluster-api.md#summary-of-the-rules-outlined-above Machine API MachineAPI Create Yes - Error - this should be rejected by a webhook
Version-Release number of selected component (if applicable):
4.20.0-0.nightly-2025-05-27-133818
How reproducible:
always
Steps to Reproduce:
1.Create a capi standalone machine, it create success, then checked it's paused shows false
liuhuali@Lius-MacBook-Pro huali-test % oc get machine.c -n openshift-cluster-api
NAME CLUSTER NODENAME PROVIDERID PHASE AGE VERSION
huliu-aws28a-htsg5-worker-2 huliu-aws28a-htsg5 ip-10-0-68-71.us-east-2.compute.internal aws:///us-east-2c/i-0fa445051da4a6886 Running 7m2s
huliu-aws28a-htsg5-worker-us-east-2a-n2w4k huliu-aws28a-htsg5 ip-10-0-15-33.us-east-2.compute.internal aws:///us-east-2a/i-09c425eb8ffd48116 Running 3h28m
huliu-aws28a-htsg5-worker-us-east-2b-xg5nt huliu-aws28a-htsg5 ip-10-0-38-61.us-east-2.compute.internal aws:///us-east-2b/i-0161134d3ca7125a2 Running 3h25m
huliu-aws28a-htsg5-worker-us-east-2c-s5gxn huliu-aws28a-htsg5 aws:///us-east-2c/i-05310e663dc0ca96c 5h34m
liuhuali@Lius-MacBook-Pro huali-test % oc get awsmachine -n openshift-cluster-api
NAME CLUSTER STATE READY INSTANCEID MACHINE
huliu-aws28a-htsg5-worker-2 huliu-aws28a-htsg5 running true aws:///us-east-2c/i-0fa445051da4a6886 huliu-aws28a-htsg5-worker-2
huliu-aws28a-htsg5-worker-us-east-2a-n2w4k huliu-aws28a-htsg5 running true aws:///us-east-2a/i-09c425eb8ffd48116 huliu-aws28a-htsg5-worker-us-east-2a-n2w4k
huliu-aws28a-htsg5-worker-us-east-2b-xg5nt huliu-aws28a-htsg5 running true aws:///us-east-2b/i-0161134d3ca7125a2 huliu-aws28a-htsg5-worker-us-east-2b-xg5nt
huliu-aws28a-htsg5-worker-us-east-2c-s5gxn huliu-aws28a-htsg5 aws:///us-east-2c/i-05310e663dc0ca96c huliu-aws28a-htsg5-worker-us-east-2c-s5gxn
2.Create a same name mapi machine with AuthoritativeAPI:MachineAPI
liuhuali@Lius-MacBook-Pro huali-test % cat ms1.yaml
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
name: huliu-aws28a-htsg5-worker-2
namespace: openshift-machine-api
spec:
authoritativeAPI: MachineAPI
lifecycleHooks: {}
metadata: {}
providerSpec:
value:
ami:
id: ami-0d4a7b7677c0c883f
apiVersion: machine.openshift.io/v1beta1
blockDevices:
- ebs:
encrypted: true
iops: 0
kmsKey:
arn: ""
volumeSize: 120
volumeType: gp3
capacityReservationId: ""
credentialsSecret:
name: aws-cloud-credentials
deviceIndex: 0
iamInstanceProfile:
id: huliu-aws28a-htsg5-worker-profile
instanceType: m6i.xlarge
kind: AWSMachineProviderConfig
metadata:
creationTimestamp: null
metadataServiceOptions: {}
placement:
availabilityZone: us-east-2c
region: us-east-2
securityGroups:
- filters:
- name: tag:Name
values:
- huliu-aws28a-htsg5-node
- filters:
- name: tag:Name
values:
- huliu-aws28a-htsg5-lb
subnet:
filters:
- name: tag:Name
values:
- huliu-aws28a-htsg5-subnet-private-us-east-2c
tags:
- name: kubernetes.io/cluster/huliu-aws28a-htsg5
value: owned
userDataSecret:
name: worker-user-data
liuhuali@Lius-MacBook-Pro huali-test %
3.The mapi machine created success, and mapi one's paused shows false, capi one's paused changed to true. But according to enhancement doc https://github.com/openshift/enhancements/blob/master/enhancements/machine-api/converting-machine-api-to-cluster-api.md#summary-of-the-rules-outlined-above, this should error and the mapi machine should not be created.
Machine API MachineAPI Create Yes - Error - this should be rejected by a webhook
liuhuali@Lius-MacBook-Pro huali-test % oc create -f ms1.yaml
machine.machine.openshift.io/huliu-aws28a-htsg5-worker-2 created
liuhuali@Lius-MacBook-Pro huali-test % oc get machine
NAME PHASE TYPE REGION ZONE AGE
huliu-aws28a-htsg5-master-0 Running m6i.xlarge us-east-2 us-east-2a 5h59m
huliu-aws28a-htsg5-master-1 Running m6i.xlarge us-east-2 us-east-2b 5h59m
huliu-aws28a-htsg5-master-2 Running m6i.xlarge us-east-2 us-east-2c 5h59m
huliu-aws28a-htsg5-worker-2 Running m6i.xlarge us-east-2 us-east-2c 5s
huliu-aws28a-htsg5-worker-us-east-2a-n2w4k Provisioning 3h30m
huliu-aws28a-htsg5-worker-us-east-2b-xg5nt 3h26m
huliu-aws28a-htsg5-worker-us-east-2c-s5gxn Running m6i.xlarge us-east-2 us-east-2c 5h55m
Actual results:
mapi machine created success, and mapi one's paused shows false, capi one's paused changed to true. huliu-aws28a-htsg5-worker-2 Running m6i.xlarge us-east-2 us-east-2c 5s
Expected results:
should error and the mapi machine should not be created.
Additional info:
must-gather: https://drive.google.com/file/d/13gCEltmei4rUZ6mz2vNypQ_qCV57qT46/view?usp=sharing enhancement: https://drive.google.com/file/d/1Nfij75MD_05hWl2ZvGIeWk_3jNp4ZtJN/view?usp=sharing
- impacts account
-
OCPCLOUD-3188 Validate creation of Machine API MachineSets
-
- To Do
-
-
OCPCLOUD-2641 Validate creation of Machine API Machines
-
- Closed
-