Description of problem: Version-Release number of selected component (if applicable): Satellite 6.8 tfm-rubygem-ms_rest_azure-0.11.1-2.el7sat.noarch tfm-rubygem-foreman_azure_rm-2.1.2-1.fm2_1.el7sat.noarch tfm-rubygem-azure_mgmt_compute-0.18.7-1.el7sat.noarch tfm-rubygem-azure_mgmt_network-0.19.0-1.el7sat.noarch tfm-rubygem-azure_mgmt_storage-0.17.10-1.el7sat.noarch tfm-rubygem-azure_mgmt_subscriptions-0.18.2-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_azure_rm-0.2.0-1.el7sat.noarch tfm-rubygem-azure_mgmt_resources-0.17.6-1.el7sat.noarch How reproducible: Steps to Reproduce: 1. Create Azure Compute Resource and create Image that is mapped to an image in Azure with plan info 2. Try to build a host 3. Error Actual results: Failed to create a compute VMAZURE (Azure Resource Manager) instance vm.example.com: { "message": "Long running operation failed with status Failed", "request": { "base_uri": "https://management.azure.com", "path_template": "https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxx/providers/Microsoft.Compute/locations/eastus2/operations/f762f41a-6a64-49ff-ae31-71ee6d23e8ac?api-version=2019-03-01", "method": "get", "path_params": null, "skip_encoding_path_params": null, "query_params": null, "skip_encoding_query_params": null, "headers": { "Content-Type": "application/json; charset=utf-8", "Accept": "application/json", "accept-language": "en-US", "x-ms-client-request-id": "9423959a-e8df-4754-a42e-f25b00a31a1e" }, "body": null, "middlewares": [ [ "MsRest::RetryPolicyMiddleware", { "times": 3, "retry": 0.02 } ], [ "cookie_jar" ] ], "log": null }, "response": { "body": "{\r\n \"startTime\": \"2021-03-02T19:25:01.9399099+00:00\",\r\n \"endTime\": \"2021-03-02T19:25:05.9869235+00:00\",\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"VMMarketplaceInvalidInput\",\r\n \"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/xxxxxxxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm'.\"\r\n },\r\n \"name\": \"f762f41a-6a64-49ff-ae31-71ee6d23e8ac\"\r\n}", "headers": { "Cache-Control": "no-cache", "Pragma": "no-cache", "Content-Length": "557", "Content-Type": "application/json; charset=utf-8", "Expires": "-1", "x-ms-ratelimit-remaining-resource": "Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29994", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "x-ms-request-id": "4f9821c6-0ccc-4873-865d-e2db38525911", "Server": "Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0", "x-ms-ratelimit-remaining-subscription-reads": "11999", "x-ms-correlation-request-id": "72c8d906-6624-4c9d-9059-fa816591d3e5", "x-ms-routing-request-id": "CENTRALUS:20210302T192532Z:72c8d906-6624-4c9d-9059-fa816591d3e5", "X-Content-Type-Options": "nosniff", "Date": "Tue, 02 Mar 2021 19:25:32 GMT" }, "status": 200 } } Expected results: VM to build without errors Additional info: Screenshots are in case of VM params with plan info and shared image gallery info. We do have support in the Azure Ruby SDK for plans, it looks like we just need to add it in the plugin. ttps://github.com/Azure/azure-sdk-for-ruby/blob/master/management/azure_mgmt_compute/lib/2019-12-01/generated/azure_mgmt_compute.rb --- autoload :ImagePurchasePlan, '2019-12-01/generated/azure_mgmt_compute/models/image_purchase_plan.rb' autoload :PurchasePlan, '2019-12-01/generated/azure_mgmt_compute/models/purchase_plan.rb'
Forgot to add Description of problem: If you create an image of a marketplace VM in a shared image gallery that contains plan info from the marketplace, Satellite cannot build the VM because we do not send off the plan info. If you create the VM in the Azure portal it works fine. Comment from customer in the case: I just wanted to check to see if there was any update yet? This is getting critical for us to be able to provision in Azure via Satellite.
*** Bug 1992092 has been marked as a duplicate of this bug. ***
Upstream bug assigned to chrobert
qe_test_coverage+ as this bug is covered in https://github.com/SatelliteQE/robottelo/blob/master/tests/foreman/cli/test_computeresource_azurerm.py#L616 .
So it does look like we have plan info in the Azure plugin: app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: def marketplace_image_plan(image) app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: image_plan = ComputeModels::PurchasePlan.new app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: image_plan.publisher = publisher.downcase app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: image_plan.name = sku.downcase app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: image_plan.product = offer.downcase app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: image_plan app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb: vm_params.plan = marketplace_image_plan(vm_hash[:image_id]) I wonder if we just are not using it correctly, it looks like the MSFT SDK also has support for it: azure_sdk/lib/latest/modules/compute_profile_module.rb: ImagePurchasePlan = Azure::Compute::Mgmt::V2019_12_01::Models::ImagePurchasePlan azure_sdk/lib/latest/modules/compute_profile_module.rb: Plan = Azure::Compute::Mgmt::V2020_06_01::Models::Plan azure_sdk/lib/latest/modules/compute_profile_module.rb: PurchasePlan = Azure::Compute::Mgmt::V2020_06_01::Models::PurchasePlan https://samcogan.com/creating-vms-from-a-marketplace-image-that-needs-a-plan
Hi Team, We are making progress on this, I got past the error saying vm needs plan info to a new one saying you need to accept the terms and subscriptions before you can use the vm, so I got it to send the plan info over. I am working on this error and syncing up with another engineer who will be helping Monday as he will be helping as well. I will keep you posted as we make more progress, but so far we got past the initial error so we should have a soultion soon. - Chris Roberts
Hi Everyone, This issue is resolved with this KCS: https://access.redhat.com/solutions/6961347 If you need further help, please open a support ticket. - Chris Roberts