Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-56897

When authoritativeAPI is ClusterAPI, delete mapi machineset, capi machine will be deleted and recreated a new one

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When authoritativeAPI: ClusterAPI, delete mapi machineset, mapi machineset/machines will be deleted, capi machine will be deleted and recreated a new one

      Version-Release number of selected component (if applicable):

      4.20.0-0.nightly-2025-05-28-190420

      How reproducible:

      Always 

      Steps to Reproduce:

      1. Create a new mapi machineset with authoritativeAPI: ClusterAPI
      2. Delete mapi machineset 
      3. Check if there are new capi machine be created
          

      Actual results:

      capi machine will be deleted and recreated a new one
      
      zhsun:aws1/ $ oc delete machineset.m zhsunaws20-tkx5x-worker3        
      machineset.machine.openshift.io "zhsunaws20-tkx5x-worker3" deleted
      
      zhsun:aws1/ $ oc get machineset.c -n openshift-cluster-api    
      NAME                                 CLUSTER            REPLICAS   READY   AVAILABLE   AGE     VERSION
      zhsunaws20-tkx5x-worker-us-east-2a   zhsunaws20-tkx5x                                  5h12m
      zhsunaws20-tkx5x-worker-us-east-2b   zhsunaws20-tkx5x                                  5h17m
      zhsunaws20-tkx5x-worker-us-east-2c   zhsunaws20-tkx5x                                  5h12m
      zhsunaws20-tkx5x-worker3             zhsunaws20-tkx5x   1          0       0           8m58s
      
      zhsun:aws1/ $ oc get machines.cluster.x-k8s.io -n openshift-cluster-api        
      NAME                                       CLUSTER            NODENAME                                    PROVIDERID                              PHASE         AGE     VERSION
      zhsunaws20-tkx5x-worker-us-east-2a-prn8c   zhsunaws20-tkx5x                                               aws:///us-east-2a/i-0763ec39b4b27c2da                 5h7m
      zhsunaws20-tkx5x-worker-us-east-2b-qhsbb   zhsunaws20-tkx5x                                               aws:///us-east-2b/i-062b3db011c75ccbd                 4h44m
      zhsunaws20-tkx5x-worker-us-east-2c-djzkd   zhsunaws20-tkx5x                                               aws:///us-east-2c/i-01c92416ae9db4c0a                 5h7m
      zhsunaws20-tkx5x-worker3-l58hm             zhsunaws20-tkx5x                                               aws:///us-east-2c/i-0b92fa6125bc4905d   Provisioned   79s 
      
      zhsun:aws1/ $ oc get machineset.m            
      NAME                                 DESIRED   CURRENT   READY   AVAILABLE   AGE
      zhsunaws20-tkx5x-worker-us-east-2a   1         1         1       1           5h35m
      zhsunaws20-tkx5x-worker-us-east-2b   1         1         1       1           5h35m
      zhsunaws20-tkx5x-worker-us-east-2c   1         1         1       1           5h35m
      zhsun:aws1/ $ oc get machine.m          
      NAME                                       PHASE     TYPE         REGION      ZONE         AGE
      zhsunaws20-tkx5x-master-0                  Running   m6i.xlarge   us-east-2   us-east-2a   5h36m
      zhsunaws20-tkx5x-master-1                  Running   m6i.xlarge   us-east-2   us-east-2b   5h36m
      zhsunaws20-tkx5x-master-2                  Running   m6i.xlarge   us-east-2   us-east-2c   5h36m
      zhsunaws20-tkx5x-worker-us-east-2a-prn8c   Running   m6i.xlarge   us-east-2   us-east-2a   5h32m
      zhsunaws20-tkx5x-worker-us-east-2b-qhsbb   Running   m6i.xlarge   us-east-2   us-east-2b   4h49m
      zhsunaws20-tkx5x-worker-us-east-2c-djzkd   Running   m6i.xlarge   us-east-2   us-east-2c   5h32m
      
      zhsun:aws1/ $ oc get machineset.c -n openshift-cluster-api  
      NAME                                 CLUSTER            REPLICAS   READY   AVAILABLE   AGE     VERSION
      zhsunaws20-tkx5x-worker-us-east-2a   zhsunaws20-tkx5x                                  5h25m
      zhsunaws20-tkx5x-worker-us-east-2b   zhsunaws20-tkx5x                                  5h29m
      zhsunaws20-tkx5x-worker-us-east-2c   zhsunaws20-tkx5x                                  5h25m
      zhsunaws20-tkx5x-worker3             zhsunaws20-tkx5x   1          0       0           21m
      zhsun:aws1/ $ oc get machines.cluster.x-k8s.io -n openshift-cluster-api   
      NAME                                       CLUSTER            NODENAME                                    PROVIDERID                              PHASE     AGE     VERSION
      zhsunaws20-tkx5x-worker-us-east-2a-prn8c   zhsunaws20-tkx5x                                               aws:///us-east-2a/i-0763ec39b4b27c2da             5h20m
      zhsunaws20-tkx5x-worker-us-east-2b-qhsbb   zhsunaws20-tkx5x                                               aws:///us-east-2b/i-062b3db011c75ccbd             4h56m
      zhsunaws20-tkx5x-worker-us-east-2c-djzkd   zhsunaws20-tkx5x                                               aws:///us-east-2c/i-01c92416ae9db4c0a             5h20m
      zhsunaws20-tkx5x-worker3-l58hm             zhsunaws20-tkx5x   ip-10-0-94-219.us-east-2.compute.internal   aws:///us-east-2c/i-0b92fa6125bc4905d   Running   13m

      Expected results:

      capi machineset and machine are deleted, no new machine will be created

      Additional info:

      https://issues.redhat.com/browse/OCPBUGS-56722 

              rh-ee-tbarberb Theo Barber-Bany
              rhn-support-zhsun Zhaohua Sun
              None
              None
              Zhaohua Sun Zhaohua Sun
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: