Bug 1645117 - No registered resource provider found for location 'germanycentral' and API version '2014-04-01' for type 'virtualMachines'
Summary: No registered resource provider found for location 'germanycentral' and API v...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.10.0
Assignee: Daniel Berger
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks: 1648955
TreeView+ depends on / blocked
 
Reported: 2018-11-01 12:47 UTC by Niladri Roy
Modified: 2021-12-10 18:08 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1648955 (view as bug list)
Environment:
Last Closed: 2019-02-12 16:52:00 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Niladri Roy 2018-11-01 12:47:07 UTC
Description of problem:
Unable to collect performance data for Azure with below error

[----] E, [2018-10-30T03:43:33.101275 #3838:e91114] ERROR -- : [Azure::Armrest::BadRequestException]: No registered resource provider found for location 'germanycentral' and API version '2014-04-01' for type 'virtualMachines'. The supported api-versions are '2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-04-30-preview, 2016-08-30, 2017-03-30, 2017-12-01, 2018-04-01, 2018-06-01, 2018-10-01'. The supported locations are 'germanycentral, germanynortheast'.  Method:[block in method_missing]


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

How reproducible:
Everytime at Cu environment

Steps to Reproduce:
1. Add Azure provider in germanycentral region
2. enable performance capture
3. 

Actual results:
performance capture fails with

----] E, [2018-10-30T03:43:33.100881 #3838:e91114] ERROR -- : MIQ(ManageIQ::Providers::Azure::CloudManager::MetricsCapture#get_counters) Unhandled exception during counter collection: ocp04b01/ocp04-rg

Expected results:
Metrics capture should succeed

Additional info:

Comment 3 Bronagh Sorota 2018-11-01 13:33:06 UTC
Dan
Can you verify this just requires a backport of: https://github.com/ManageIQ/manageiq-providers-azure/pull/98

thanks
Bronagh

Comment 4 Daniel Berger 2018-11-01 16:35:06 UTC
Bronagh, yep, that should do it.

Comment 5 Daniel Berger 2018-11-01 18:21:05 UTC
Actually, it looks like we already support the Germany endpoint in 5.9.

https://github.com/ManageIQ/manageiq-providers-azure/blob/gaprindashvili/app/models/manageiq/providers/azure/manager_mixin.rb#L59

The api-version should be set via config/settings.yml. I will continue to dig.

Comment 6 Daniel Berger 2018-11-01 18:31:16 UTC
Hm, I noticed that this error is popping up from metrics. I wonder if insights registered, because it's not necessarily registered by default in some regions.

Try running this command:

  az provider show -n Microsoft.Insights -o table

If the ProviderState isn't "registered" then run this:

  az provider register -n Microsoft.Insights

If it is registered, then it must be something else and I'll keep digging. Please let me know.

Comment 8 Niladri Roy 2018-11-02 13:12:11 UTC
Seems that the provider is registered


az provider show -n Microsoft.Insights -o table
Namespace           RegistrationState
------------------  -------------------
microsoft.insights  Registered

Comment 9 Daniel Berger 2018-11-02 16:57:45 UTC
It's looking to me like Azure changed the endpoint for listing metric definitions, which means metrics is broken everywhere now.

I'll have to update the azure-armrest gem asap, and get it backported.

Comment 10 Daniel Berger 2018-11-02 21:17:31 UTC
Ah, I forgot there's an "old" metrics listing (i.e. diagnostics, for those vm's that have it enabled) and a new one. The new one has a different endpoint, and is cross-platform, but doesn't collect the information we want.

I think the short version is that the old version is simply not supported on that region, and using different api-version strings does not help, even if the insights provider is enabled.

All we can do is add a catch for Azure::Armrest::BadRequestException and, if we hit that, assume that it's not supported for that region. I'll submit a PR soon.

Comment 14 CFME Bot 2018-11-12 16:08:12 UTC
New commit detected on ManageIQ/manageiq-providers-azure/hammer:

https://github.com/ManageIQ/manageiq-providers-azure/commit/3e5ba61abfd42d3a3b13d135b2aa2a04c98b4162
commit 3e5ba61abfd42d3a3b13d135b2aa2a04c98b4162
Author:     Adam Grare <agrare>
AuthorDate: Thu Nov  8 10:55:32 2018 -0500
Commit:     Adam Grare <agrare>
CommitDate: Thu Nov  8 10:55:32 2018 -0500

    Merge pull request #302 from djberg96/metrics_unsupported

    Handle regions where metrics are unsupported

    (cherry picked from commit a94f2b03a21ac70f07e11ef327740e6af8d889ce)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1645117

 app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb | 5 +
 spec/models/manageiq/providers/azure/cloud_manager/metrics_capture_spec.rb | 48 +-
 2 files changed, 52 insertions(+), 1 deletion(-)

Comment 15 Nandini Chandra 2018-12-18 23:35:32 UTC
Verified in 5.10.0.29


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