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

Azure HC fails to create AzureMachineTemplate if a MachineIdentityID is not provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 4.16.z
    • 4.17.0, 4.16.z
    • HyperShift
    • Moderate
    • No
    • Hypershift Sprint 256, Hypershift Sprint 257, Hypershift Sprint 258
    • 3
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • In Progress

      This is a clone of issue OCPBUGS-36681. The following is the description of the original issue:

      Description of problem:

      Azure HC fails to create AzureMachineTemplate if a MachineIdentityID is not provided. 
      
      E0705 19:09:23.783858       1 controller.go:329] "Reconciler error" err="failed to parse ProviderID : invalid resource ID: id cannot be empty" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" AzureMachineTemplate="clusters-hostedcp-1671-hc/hostedcp-1671-hc-f412695a" namespace="clusters-hostedcp-1671-hc" name="hostedcp-1671-hc-f412695a" reconcileID="74581db2-0ac0-4a30-abfc-38f07b8247cc"
      
      https://github.com/openshift/hypershift/blob/84f594bd2d44e03aaac2d962b0d548d75505fed7/hypershift-operator/controllers/nodepool/azure.go#L52 does not check first to see if a MachineIdentityID was provided before adding the UserAssignedIdentity field.

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

          

      How reproducible:

          Every time

      Steps to Reproduce:

          1. Create an Azure HC without a MachineIdentityID
          

      Actual results:

          Azure HC fails to create AzureMachineTemplate properly, nodes aren't created, and HC is in a failed state.

      Expected results:

           Azure HC creates AzureMachineTemplate properly, nodes are created, and HC is in a completed state.

      Additional info:

          

            rh-ee-brcox Bryan Cox
            openshift-crt-jira-prow OpenShift Prow Bot
            Feilian Xie Feilian Xie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: