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

On aws lots of capi machines were created when creating capi machineset with wrong label

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • None
    • Rejected
    • CLOUD Sprint 271, CLOUD Sprint 272, CLOUD Sprint 273, CLOUD Sprint 274, CLOUD Sprint 275, CLOUD Sprint 276, CLOUD Sprint 277, CLOUD Sprint 278, CLOUD Sprint 279, CLOUD Sprint 280, CLOUD Sprint 281, CLOUD Sprint 282, CLOUD Sprint 283, CLOUD Sprint 284, CLOUD Sprint 285
    • 15
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      After cluster installation, enable TechPreviewNoUpgrade, then manually create a capi machineset with wrong lable, lots of capi machines will be created.
      
      

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

      4.19.0-0.nightly-2025-05-06-051838

      How reproducible:

      Met one time    

      Steps to Reproduce:

      1. enable TechPreviewNoUpgrade     
      2. manually create a capi machineset with wrong lable
      3.
          

      Actual results:

      Lots of capi machines were created 
      
      $ oc get machine -n openshift-cluster-api -o name | grep zhsunaws-qdzzt-worker1 | wc -l                                                    
           395
      
      $ cat capi-machineset.yaml
      apiVersion: cluster.x-k8s.io/v1beta1
      kind: MachineSet
      metadata:
        name: zhsunaws-qdzzt-worker1
        namespace: openshift-cluster-api
        labels:
          cluster.x-k8s.io/cluster-name: zhsunaws-qdzzt
      spec:
        clusterName: zhsunaws-qdzzt
        replicas: 1
        selector:
          matchLabels:
            #capilabel1: capilabel1
            cluster.x-k8s.io/cluster-name: zhsunaws-qdzzt
            cluster.x-k8s.io/set-name: zhsunaws-qdzzt-worker-us-east-2cc
        template:
          metadata:
            #annotations:
             # anno1: anno1
            labels:
              #capilabel1: capilabel1
              cluster.x-k8s.io/cluster-name: zhsunaws-qdzzt
              cluster.x-k8s.io/set-name: zhsunaws-qdzzt-worker-us-east-2cc
              node-role.kubernetes.io/worker: ""
          spec:
            bootstrap:
               dataSecretName: worker-user-data
            clusterName: zhsunaws-qdzzt
            infrastructureRef:
              apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
              kind: AWSMachineTemplate
              name: zhsunaws-qdzzt-worker1

      Expected results:

      Shouldn't allow to create machine with wrong lable

      Additional info:

      must-gather:  https://drive.google.com/file/d/1HrgWLFfuRpeexnEh-FoHtyxW8wJRWXlN/view?usp=sharing 

              ddonati@redhat.com Damiano Donati
              rhn-support-zhsun Zhaohua Sun
              Zhaohua Sun Zhaohua Sun
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: