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

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


    • No
    • False
    • Hide



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

      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:


      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 
       is not available in eastus region. Please contact image owner to 
      replicate to this region, or change your requested region."" 
      But the image can be found at:

      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.

            Unassigned Unassigned
            openshift-crt-jira-prow OpenShift Prow Bot
            Jinyun Ma Jinyun Ma
            0 Vote for this issue
            6 Start watching this issue