az k8s-extension create | Attempt to register a Resource Provider that is already registered #8293
Labels
Alerts Management
Auto-Assign
Auto assign by bot
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Connected Kubernetes
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
extension/grafana
az grafana
Service Attention
This issue is responsible by Azure service team.
Describe the bug
When executing the
az k8s-extension create
command, the extension fails with the following error message:The signed-in user does not have permission to register a provider, so the error message is accurate. However, this provider (Microsoft.Monitor) is already registered, and the extension should not attempt to perform this task.
az provider show --namespace Microsoft.Monitor --query registrationState "Registered"
Issue is located in file helper.py
The following code requires an update (starting line 65). The value isAlertsManagementRpRegistered is incorrectly set to True for both microsoft.monitor and microsoft.dashboard. The correct values
isMoniotrRpRegistered
andisDashboardRpRegistered
should be used instead.Fixed code:
In addition, there is a typo error in the term isMoniotrRpRegistered, it should be corrected to isMonitorRpRegistered.
Related command
Errors
Issue script & Debug output
Issue is located in file helper.py as described in the main section.
Expected behavior
Do not register Microsoft.Monitor resource provider if it is already registered.
Environment Summary
azure-cli 2.66.0
core 2.66.0
telemetry 1.1.0
Extensions:
amg 2.5.3
azure-iot-ops 1.0.0
connectedk8s 1.10.2
k8s-configuration 2.1.0
k8s-extension 1.6.2
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Extensions directory '/home/azureuser/.azure/cliextensions'
Python (Linux) 3.12.7 (main, Oct 30 2024, 03:56:40) [GCC 11.4.0]
Additional context
No response
The text was updated successfully, but these errors were encountered: