Bug 1503295

Summary: Azure Instances Can Have Empty Resource Groups when Location of Instance & Group mismatch Causing SSA Failure
Product: Red Hat CloudForms Management Engine Reporter: Jerry Keselman <jkeselma>
Component: ProvidersAssignee: Daniel Berger <dberger>
Status: CLOSED CURRENTRELEASE QA Contact: Satyajit Bulage <sbulage>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: bsorota, dberger, gblomqui, jfrey, jhardy, obarenbo, sbulage, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1515452 (view as bug list) Environment:
Last Closed: 2018-06-21 20:31:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Azure Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1515452    

Description Jerry Keselman 2017-10-17 19:35:50 UTC
Description of problem:
When the Azure refresh parser finds an Instance in one region with a Resource Group in a different region, no resource group is populated in the DB.  Many azure-armrest API calls on the Instance require the Resource Group.  When SSA is attempted on this instance it will fail since there is no resource group to dereference.

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


How reproducible: Whenever an Azure Instance has a Resource Group from a different Region.


Steps to Reproduce:
1. Add an Azure Instance in one region and assign it to a Resource Group from another region.
2.
3.

Actual results:SSA will fail with the following message:
Failed to create evm snapshot with EMS. Error: [NoMethodError]: [undefined method `name' for nil:NilClass]


Expected results: SSA should succeed.


Additional info:

Comment 2 Daniel Berger 2017-10-19 14:46:12 UTC
Technically, resource groups in Azure have a location. In practice, the location of a resource group has little significance, since Azure doesn't mandate that the resources within a resource group be in the same region.

Agreed that this is a bug on our end. We should just collect all resource groups in the refresh parser regardless of provider region so that we are guaranteed to have the relationship setup.

Comment 4 Daniel Berger 2017-11-02 19:46:20 UTC
Fixed with https://github.com/ManageIQ/manageiq-providers-azure/pull/142

Comment 5 Jerry Keselman 2017-11-06 14:19:25 UTC
So This wasn't really fixed with the above PR - I would think this should be changed back to ON_DEV...

Comment 7 Jerry Keselman 2017-11-20 15:02:04 UTC
*** Bug 1502734 has been marked as a duplicate of this bug. ***