Uploaded image for project: 'OpenShift Hive'
  1. OpenShift Hive
  2. HIVE-3051

Add Plan field to Azure OSImage to support marketplace image types

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None
    • None

      The current Hive v1 API definition for Azure OSImage does not include the Plan field.  Consequently, all manually specified osImages default to third-party images (ThirdPartyImage=true, WithPurchasePlan in the installer), requiring users to accept marketplace terms even for first-party images.

       
      1. Worker MachinePool without specifying OSImage (MAO default)
      % oc get machineset -n openshift-machine-api mihuang3014-cktfl-worker-centralus1 -o json | jq '.spec.template.spec.providerSpec.value.image'
      {
       "offer": "aro4",
       "publisher": "azureopenshift",
       "resourceID": "",
       "sku": "420-v2",
       "type": "MarketplaceNoPlan",
       "version": "9.6.20251015"
      }
       
      2. Additional MachinePool (infra) without specifying OSImage
      % oc get machineset -n openshift-machine-api mihuang3014-cktfl-infra-centralus1 -o json | jq '.spec.template.spec.providerSpec.value.image'

      {  "offer": "aro4",  "publisher": "azureopenshift",  "resourceID": "",  "sku": "aro_420",  "version": "9.6.20251015" }

       
      3. Created infra-os machinepool specified the same osImage as the infra machinepool,
      % oc get machineset -n openshift-machine-api mihuang3014-cktfl-infra-os-centralus1 -o json | jq '.spec.template.spec.providerSpec.value.image'
      {
       "offer": "aro4",
       "publisher": "azureopenshift",
       "resourceID": "",
       "sku": "aro_420",
       "type": "MarketplaceWithPlan",
       "version": "9.6.20251015"
      }
      Error message with OSImage specified:

      errorMessage: | failed to reconcile machine "mihuang3014-cktfl-infra-os-centralus1-cq6g4": failed to create vm mihuang3014-cktfl-infra-os-centralus1-cq6g4: failed to create VM: cannot create vm: PUT https://management.azure.com/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/mihuang3014-cktfl-rg/providers/Microsoft.Compute/virtualMachines/mihuang3014-cktfl-infra-os-centralus1-cq6g4 -------------------------------------------------------------------------------- RESPONSE 400: 400 Bad Request ERROR CODE: ResourcePurchaseValidationFailed -------------------------------------------------------------------------------- { "error": { "code": "ResourcePurchaseValidationFailed", "message": "User failed validation to purchase resources. Error message: 'You have not accepted the legal terms on this subscription: '53b8f551-f0fc-4bea-8cba-6d1fefd54c8a' for this plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI commands described at https://go.microsoft.com/fwlink/?linkid=2110637 or the PowerShell commands available at https://go.microsoft.com/fwlink/?linkid=862451. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting the legal terms. Offer details: publisher='azureopenshift' offer = 'aro4', sku = 'aro_420', Correlation Id: '27eeafef-411a-41ea-bd21-9f0343b7fadb'.'" } } -------------------------------------------------------------------------------- errorReason: InvalidConfiguration lastUpdated: "2026-01-13T19:51:37Z" phase: Failed providerStatus: conditions: - lastTransitionTime: "2026-01-13T19:51:37Z" message: | failed to create vm mihuang3014-cktfl-infra-os-centralus1-cq6g4: failed to create VM: cannot create vm: PUT https://management.azure.com/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/mihuang3014-cktfl-rg/providers/Microsoft.Compute/virtualMachines/mihuang3014-cktfl-infra-os-centralus1-cq6g4 -------------------------------------------------------------------------------- RESPONSE 400: 400 Bad Request ERROR CODE: ResourcePurchaseValidationFailed -------------------------------------------------------------------------------- { "error": { "code": "ResourcePurchaseValidationFailed", "message": "User failed validation to purchase resources. Error message: 'You have not accepted the legal terms on this subscription: '53b8f551-f0fc-4bea-8cba-6d1fefd54c8a' for this plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI commands described at https://go.microsoft.com/fwlink/?linkid=2110637 or the PowerShell commands available at https://go.microsoft.com/fwlink/?linkid=862451. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting the legal terms. Offer details: publisher='azureopenshift' offer = 'aro4', sku = 'aro_420', Correlation Id: '27eeafef-411a-41ea-bd21-9f0343b7fadb'.'" } } -------------------------------------------------------------------------------- reason: MachineCreationFailed status: "False" type: MachineCreated metadata: {}

              rh-ee-mold Mark Old
              mihuang@redhat.com Mingxia Huang
              None
              None
              Mingxia Huang Mingxia Huang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: