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

[azure] missing instance type validation check under defaultMachinePlatform

XMLWordPrintable

    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, the installation program did not validate some configuration settings before installing the cluster. This behavior occurred when these settings were only specified in the default machine configuration (`platform.azure.defaultMachinePlatform`). As a result, the installation would succeed even if the following conditions were met:

      * An unsupported machine instance type was specified.
      * Additional functionality, such as accelerated networking or the use of Azure ultra disks, was not supported by the specified machine instance type.

      With this fix, the installation program now displays an error message that specifies the unsupported configuration. (link:https://issues.redhat.com/browse/OCPBUGS-20364[*OCPBUGS-20364*])
      Show
      Previously, the installation program did not validate some configuration settings before installing the cluster. This behavior occurred when these settings were only specified in the default machine configuration (`platform.azure.defaultMachinePlatform`). As a result, the installation would succeed even if the following conditions were met: * An unsupported machine instance type was specified. * Additional functionality, such as accelerated networking or the use of Azure ultra disks, was not supported by the specified machine instance type. With this fix, the installation program now displays an error message that specifies the unsupported configuration. (link: https://issues.redhat.com/browse/OCPBUGS-20364 [* OCPBUGS-20364 *])
    • Bug Fix
    • Done

      Description of problem:

      There is no instance type validation check under defaultMachinePlatform.
      For example, set platform.azure.defaultMachinePlatform.type to Standard_D11_v2, which does not support PremiumIO, then create manifests:
       
      # az vm list-skus --location southcentralus --size Standard_D11_v2 --query "[].capabilities[?name=='PremiumIO'].value" -otsv
      False
      
      install-config.yaml:
      -------------------
      platform:
        azure:
          defaultMachinePlatform:
            type: Standard_D11_v2
          baseDomainResourceGroupName: os4-common
          cloudName: AzurePublicCloud
          outboundType: Loadbalancer
          region: southcentralus
      
      succeeded to create manifests:
      $ ./openshift-install create manifests --dir ipi
      INFO Credentials loaded from file "/home/fedora/.azure/osServicePrincipal.json" 
      INFO Consuming Install Config from target directory 
      INFO Manifests created in: ipi/manifests and ipi/openshift 
      
      while get expected error when setting type under compute:
      $ ./openshift-install create manifests --dir ipi
      INFO Credentials loaded from file "/home/fedora/.azure/osServicePrincipal.json" 
      ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: compute[0].platform.azure.osDisk.diskType: Invalid value: "Premium_LRS": PremiumIO not supported for instance type Standard_D11_v2
      
      same situation for field vmNetworkingType under defaultMachinePlatform, instance type Standard_B4ms does not support Accelerated networking.
      # az vm list-skus --location southcentralus --size Standard_B4ms --query "[].capabilities[?name=='AcceleratedNetworkingEnabled'].value" -otsv
      False
      
      install-config.yaml
      ----------------
      platform:
        azure:
          defaultMachinePlatform:
            type: Standard_B4ms
            vmNetworkingType: "Accelerated" 
      
      install still succeeds to create manifests file, should exit with error when type and vmNetworkingType setting under compute.
      ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: compute[0].platform.azure.vmNetworkingType: Invalid value: "Accelerated": vm networking type is not supported for instance type Standard_B4ms 

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

      4.14.0-0.nightly-2023-10-08-220853

      How reproducible:

      always on all supported version

      Steps to Reproduce:

      1. configure invalid instance type ( e.g unsupported PremiumIO) under defaultMachinePlatform in install-config.yaml
      2. create manifests
      3.
      

      Actual results:

      installer creates manifests successfully.

      Expected results:

      installer should exit with error, and have similar behavior when invalid instance type is configured under compute and controlPlane.

      Additional info:

       

            rdossant Rafael Fonseca dos Santos
            jinyunma Jinyun Ma
            Jinyun Ma Jinyun Ma
            Mike Pytlak Mike Pytlak
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: