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

Azure: UPI: Fix storage arm template to work with Galleries and MAO

XMLWordPrintable

    • 3
    • Sprint 229, Sprint 230, Sprint 231
    • 3
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Done

      Description of problem:

      When we introduced aarch64 support for IPI on Azure, we changed the Installer from using managed images (no architecture support) to using Image Galleries (architecture support). This means that the place where the Installer looks for rhcos bootimages has changed from "/resourceGroups/$rg_name/providers/Microsoft.Compute/images/$cluster_id" to "/resourceGroups/$rg_name/providers/Microsoft.Compute/galleries/gallery_$cluster_id/images/$cluster_id/versions/$rhcos_version".
      This has been properly handled in the IPI workflow, with changes to the terraform configs [1]. However, our ARM template for UPI installs [2] still uploads images via Managed Images and therefore breaks workflows provisioning compute nodes with MAO.
      
      [1] https://github.com/openshift/installer/pull/6304
      [2] https://github.com/openshift/installer/blob/release-4.12/upi/azure/02_storage.json

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

      4.13 and 4.12

      How reproducible:

      always

      Steps to Reproduce:

      Any workflow that provisions compute nodes with MAO. For example, in the UPI deploy with ARM templates:
      1. Execute 06_workers.json template with compute.replicas: 0 in the install-config, then run the oc scale command to "activate" MAO provision (`oc scale --replicas=1 machineset $machineset_name -n openshift-machine-api`)
      2. Skip 06_workers.json but set compute.replicas: 3 in the install-config. MAO will provision nodes as part of the cluster deploy.

      Actual results:

      Error Message:           failed to reconcile machine 
      "maxu-upi2-gc7n8-worker-eastus3-68gdx": failed to create vm 
      maxu-upi2-gc7n8-worker-eastus3-68gdx: failure sending request for 
      machine maxu-upi2-gc7n8-worker-eastus3-68gdx: cannot create vm: 
      compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: 
      StatusCode=404 -- Original Error: Code="GalleryImageNotFound" 
      Message=""The gallery image 
      /subscriptions/53b8f551-.../resourceGroups/maxu-upi2-gc7n8-rg/providers/Microsoft.Compute/galleries/gallery_maxu_upi2_gc7n8/images/maxu-upi2-gc7n8-gen2/versions/412.86.20220930
       is not available in eastus region. Please contact image owner to 
      replicate to this region, or change your requested region."" 
      Target="imageReference"
      
      But the image can be found at:
      /subscriptions/53b8f551-.../resourceGroups/maxu-upi2-gc7n8-rg/providers/Microsoft.Compute/images/maxu-upi2-gc7n8-gen2

      Expected results:

      No errors and the bootimage is loaded from the Image Gallery.

      Additional info:

      02_storage.json template will have to be rewritten to use Image Gallery instead of Managed Images.

            rdossant Rafael Fonseca dos Santos
            rdossant Rafael Fonseca dos Santos
            May Xu May Xu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: