Bug 2027896 - Update Azure Machine Spec API to accept Marketplace Images
Summary: Update Azure Machine Spec API to accept Marketplace Images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.8.z
Assignee: Patrick Dillon
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On: 2025697
Blocks: 2027897
TreeView+ depends on / blocked
 
Reported: 2021-12-01 01:48 UTC by Patrick Dillon
Modified: 2022-01-05 16:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2025697
: 2027897 (view as bug list)
Environment:
Last Closed: 2022-01-05 16:11:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-api-provider-azure pull 245 0 None open Bug 2027896: [release-4.8] Add support for Azure Marketplace Images 2021-12-10 15:47:02 UTC
Github openshift machine-api-operator pull 970 0 None open Bug 2027896: [release-4.8] Add support for Azure Marketplace Images 2021-12-15 18:26:38 UTC
Red Hat Product Errata RHBA-2021:5209 0 None None None 2022-01-05 16:12:03 UTC

Comment 2 sunzhaohua 2021-12-14 03:51:09 UTC
After installation, create a new machineset will get error:
  conditions:
  - lastTransitionTime: "2021-12-14T01:14:14Z"
    message: 'Failed to check if machine exists: vm for machine zhsunaz14ipi-wnhrb-worker-northcentralus1-s56vm exists, but has unexpected ''Failed'' provisioning state'
    reason: ErrorCheckingProvider
    status: Unknown
    type: InstanceExists

Installation works as expected on 4.8.0-0.nightly-2021-12-13-183908.  
After generating manifests, modify the image spec in worker machineset as
      image:
        offer: ocp-worker
        publisher: redhat-rhel
        resourceID: ""
        sku: ocp-worker-100-gen1
        type: MarketplaceWithPlan
        version: 4.8.2021092400 
Installation finished successfully. Worker are created with expected image via machine-api.

Comment 5 sunzhaohua 2021-12-17 06:13:01 UTC
Seems no plan id in this 4.8 image, I cant set up cluster with it, worker machine failed with below error.
clusterversion: 4.8.0-0.nightly-2021-12-16-211324

# az vm image list --all --offer ocp-worker
[
 {
  "offer": "ocp-worker",
  "publisher": "redhat-rhel",
  "sku": "ocp-worker-100-gen1",
  "urn": "redhat-rhel:ocp-worker:ocp-worker-100-gen1:4.8.2021092400",
  "version": "4.8.2021092400"
 }
]
      message: 'failed to create vm zhsunipi3-mzh98-worker-centralus1-7z7gd: failure sending request for machine zhsunipi3-mzh98-worker-centralus1-7z7gd: cannot create vm: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="ResourcePurchaseValidationFailed" Message="User failed validation to purchase resources. Error message: ''Offer with PublisherId: ''redhat-rhel'', OfferId: ''ocp-worker'' cannot be purchased due to validation errors. For more information see details. Correlation Id: ''529af651-c656-4d25-b07d-1ee365fd24f1'' Offer with PublisherId: ''redhat-rhel'', OfferId: ''ocp-worker'' and PlanId: ocp-worker-100-gen1 was removed from the marketplace for new purchase. See similar offers here ''https://azuremarketplace.microsoft.com/en-us/marketplace/apps?page=1%26search=redhat-rhel%20ocp-worker''. Correlation Id ''529af651-c656-4d25-b07d-1ee365fd24f1''.''"'
clusterversion: 4.8.0-0.nightly-2021-12-16-211324

Comment 7 sunzhaohua 2021-12-21 08:58:42 UTC
Verified
Tested with pr https://github.com/openshift/cluster-api-provider-azure/pull/245 and https://github.com/openshift/machine-api-operator/pull/970
1.After generating manifests, modify the image spec in worker machineset as
      image:
        offer: ocp-worker
        publisher: redhat-rhel
        resourceID: ""
        sku: ocp-worker-100-gen1
        type: MarketplaceWithPlan
        version: 4.8.2021092400 
Installation finished successfully
2.Post installtion create machineset with above image, machine works well.
3.Create a cluster with WMCO, windows node works well.

Comment 9 errata-xmlrpc 2022-01-05 16:11:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.8.25 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:5209


Note You need to log in before you can comment on or make changes to this bug.