Azure / azure-cli

Azure Command-Line Interface
MIT License
4.02k stars 2.99k forks source link

Unable to add monitoring on existing AKS cluster with existing LA workspace #18005

Open kr-jmd opened 3 years ago

kr-jmd commented 3 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az aks enable-addons

Errors:

'UserAssigned' is not valid value for enum <enum 'ResourceIdentityType'>
ValueError: 'UserAssigned' is not a valid ResourceIdentityType

...

python3.8/site-packages/msrest/serialization.py, ln 951, in serialize_enum
    raise SerializationError(error.format(attr, enum_obj))
msrest.exceptions.SerializationError: 'UserAssigned' is not valid value for enum <enum 'ResourceIdentityType'>

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

macOS-10.15.7-x86_64-i386-64bit
Python 3.8.1
Shell: bash

azure-cli 2.0.81

Additional Context

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

Issue Details
### **This is autogenerated. Please review and update as needed.** ## Describe the bug **Command Name** `az aks enable-addons` **Errors:** ``` 'UserAssigned' is not valid value for enum ValueError: 'UserAssigned' is not a valid ResourceIdentityType ... python3.8/site-packages/msrest/serialization.py, ln 951, in serialize_enum raise SerializationError(error.format(attr, enum_obj)) msrest.exceptions.SerializationError: 'UserAssigned' is not valid value for enum ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `az aks enable-addons -a {} -n {} -g {} --workspace-resource-id {}` ## Expected Behavior ## Environment Summary ``` macOS-10.15.7-x86_64-i386-64bit Python 3.8.1 Shell: bash azure-cli 2.0.81 ``` ## Additional Context
Author: kr-jmd
Assignees: -
Labels: `AKS`, `Service Attention`, `needs-triage`, `question`
Milestone: -
yungezz commented 3 years ago

route to appropriate team

jcaparob commented 3 years ago

Same issue with az version 2.25 { "azure-cli": "2.25.0", "azure-cli-core": "2.25.0", "azure-cli-telemetry": "1.0.6", "extensions": { "aks-preview": "0.5.0" } }

Command: az aks enable-addons -a monitoring -n ${AKS_CLUSTER_NAME} -g ${AKS_RESOURCE_GROUP} --workspace-resource-id ${AKS_MONITORING_LOG_ANALYTICS_WORKSPACE_ID}

Error:

The command failed with an unexpected error. Here is the traceback: 'DeploymentsOperations' object has no attribute 'create_or_update' Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, in _runjobs serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, in call
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in h andler File "C:\Users\jcaparob.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 2759, in aks_enable_addons _ensure_container_insights_for_monitoring(cmd, instance.addon_profiles[CONST_MONITORING_ADDON_NAME]) File "C:\Users\jcaparob.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 2293, in _ensure_container_insights_fo r_monitoring return _invoke_deployment(cmd, resource_group, deployment_name, template, params, File "C:\Users\jcaparob.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 303, in _invoke_deployment return sdk_no_wait(no_wait, smc.create_or_update, resource_group_name, deployment_name, deployment) AttributeError: 'DeploymentsOperations' object has no attribute 'create_or_update'

ipg-informatik commented 3 years ago

We had the same problem, an "az extension update --name aks-preview" should help