Enabling AKS virtual node add-on fails with python error
This is autogenerated. Please review and update as needed.
Describe the bug
Attempting to enable the virtual node addon to an AKS cluster results in a python error
Command Name az aks enable-addons
Errors: AAD role propagation done[############################################] 100.0000%The command failed with an unexpected error. Here is the traceback: 'NoneType' object has no attribute 'rpartition' 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 _run_jobs_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/init.py", line 807, in default_command_handler File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 2368, in aks_enable_addons File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 1794, in _add_virtual_node_role_assignment AttributeError: 'NoneType' object has no attribute 'rpartition'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Cluster already existed, running k8s v1.18.14
- Add subnet to exiting VNet via: az network vnet subnet create --resource-group myresgrp --vnet-name myvnetname --name virtual-subnet --address-prefixes 10.241.0.0/16
- Enable virtual nodes in cluster: az aks enable-addons --resource-group myclusterresgrp --name mycluster --addons virtual-node --subnet-name virtual-subnet
- Put any pre-requisite steps here...
- ``
Expected Behavior
Expected the addon to be enabled successfully
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI
azure-cli 2.22.1
Additional Context
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
Attempting to enable the virtual node addon to an AKS cluster results in a python error
Command Name az aks enable-addons
Errors: AAD role propagation done[############################################] 100.0000%The command failed with an unexpected error. Here is the traceback: 'NoneType' object has no attribute 'rpartition' 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 _run_jobs_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/init.py", line 807, in default_command_handler File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 2368, in aks_enable_addons File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 1794, in _add_virtual_node_role_assignment AttributeError: 'NoneType' object has no attribute 'rpartition'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Cluster already existed, running k8s v1.18.14
- Add subnet to exiting VNet via: az network vnet subnet create --resource-group myresgrp --vnet-name myvnetname --name virtual-subnet --address-prefixes 10.241.0.0/16
- Enable virtual nodes in cluster: az aks enable-addons --resource-group myclusterresgrp --name mycluster --addons virtual-node --subnet-name virtual-subnet
- Put any pre-requisite steps here...
- ``
Expected Behavior
Expected the addon to be enabled successfully
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI
azure-cli 2.22.1
Additional Context
| Author: | brobichaud |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
route to appropriate team
Bump. I'm producing the same error today with a similar command. In my case the command is
az aks enable-addons --addons azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 5m -n myCluster -g myResourceGroup
Output:
WARNING: The behavior of this command has been altered by the following extension: aks-preview
AAD role propagation done[############################################] 100.0000%ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: 'NoneType' object has no attribute 'rpartition'
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 658, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 692, 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 handler
File "C:\Users\gdjk76\.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 2135, in aks_enable_addons
add_virtual_node_role_assignment(
File "C:\Users\gdjk76\.azure\cliextensions\aks-preview\azext_aks_preview\addonconfiguration.py", line 760, in add_virtual_node_role_assignment
vnet_id = vnet_subnet_id.rpartition('/')[0]
AttributeError: 'NoneType' object has no attribute 'rpartition'
I note that my above update evidently succeeded, at least partially. The Microsoft Documentation's query shows the expected results
...
aks-secrets-store-csi-driver-tnvdn
aks-secrets-store-csi-driver-tp24n
aks-secrets-store-csi-driver-zlvlw
aks-secrets-store-provider-azure-6r5jg
aks-secrets-store-provider-azure-76kw8
aks-secrets-store-provider-azure-8p9m5
aks-secrets-store-provider-azure-9mt5c
...
and a fetch (Get-AzAksCluster) of the Cluster shows the foundCluster.AddonProfiles.azureKeyvaultSecretsProvider with this state:
Enabled Config
------- ------
True {[enableSecretRotation, true], [rotationPollInterval, 5m]}
Hi @brobichaud and @HowardHoffman, is this issue still occurring?
Closing as outdated based on no response from the original author. Please reopen / tag me if this issue is still present. Thank you.