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

[azure] Installer should have some pre-check for field plan when using marketplace image

XMLWordPrintable

    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

      Install cluster with azure marketplace image 413.92.2023101700, and set field osImage:plan to NoPurchasePlan.
      
      install-config.yaml:
      --------------------
      platform:
        azure:
          baseDomainResourceGroupName: os4-common
          cloudName: AzurePublicCloud
          outboundType: Loadbalancer
          region: southcentralus
          defaultMachinePlatform:
            osImage:
              offer: rh-ocp-worker
              publisher: redhat
              sku: rh-ocp-worker-gen1
              version: 413.92.2023101700
              plan: NoPurchasePlan
      
      
      Bootstrap vm is provisioned failed with below terraform error: 
      
      DEBUG In addition to the other similar warnings shown, 3 other variable(s) defined 
      DEBUG without being declared.                      
      ERROR                                              
      ERROR Error: waiting for creation of Linux Virtual Machine: (Name "jima02test-7jf8d-bootstrap" / Resource Group "jima02test-7jf8d-rg"): Code="VMMarketplaceInvalidInput" Message="Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request. VM: '/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima02test-7jf8d-rg/providers/Microsoft.Compute/virtualMachines/jima02test-7jf8d-bootstrap'." 
      ERROR                                              
      ERROR   with azurerm_linux_virtual_machine.bootstrap, 
      ERROR   on main.tf line 194, in resource "azurerm_linux_virtual_machine" "bootstrap": 
      ERROR  194: resource "azurerm_linux_virtual_machine" "bootstrap" { 
      ERROR                                              
      ERROR failed to fetch Cluster: failed to generate asset "Cluster": failure applying terraform for "bootstrap" stage: failed to create cluster: failed to apply Terraform: exit status 1 
      ERROR                                              
      ERROR Error: waiting for creation of Linux Virtual Machine: (Name "jima02test-7jf8d-bootstrap" / Resource Group "jima02test-7jf8d-rg"): Code="VMMarketplaceInvalidInput" Message="Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request. VM: '/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima02test-7jf8d-rg/providers/Microsoft.Compute/virtualMachines/jima02test-7jf8d-bootstrap'." 
      ERROR                                              
      ERROR   with azurerm_linux_virtual_machine.bootstrap, 
      ERROR   on main.tf line 194, in resource "azurerm_linux_virtual_machine" "bootstrap": 
      ERROR  194: resource "azurerm_linux_virtual_machine" "bootstrap" { 
      ERROR                                              
      ERROR                                              

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

      4.14.0-0.nightly-2023-11-01-235040

      How reproducible:

      Always

      Steps to Reproduce:

      1. set azure marketplace image(it has purchase plan) and plan:NoPurchasePlan in install-config.yaml file
      2. trigger the installation
      3. 
      

      Actual results:

      bootstrap vm is provisioned failed.

      Expected results:

      installer should have some validation for plan when using marketplace image with purchase plan, and exit earlier with proper message

      Additional info:

       

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

              Created:
              Updated:
              Resolved: