Az cli error when trying to create an AKS cluster
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
The error is given by az cli task on Github Actions and I have reproduced it manually by passing "y | " to az aks command to avoid confirmation for: "It is highly recommended to use USER assigned identity (option --assign-identity) when you want to bring your ownsubnet, which will have no latency for the role assignment to take effect. When using SYSTEM assigned identity, azure-cli will grant Network Contributor role to the system assigned identity after the cluster is created, and the role assignment will take some time to take effect, see https://docs.microsoft.com/azure/aks/use-managed-identity, proceed to create cluster with system assigned identity? (y/N): "
Command Name
az aks create
Errors:
The command failed with an unexpected error. Here is the traceback:
Traceback (most recent call last):
File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/custom.py", line 2023, in aks_create
mc = aks_create_decorator.construct_default_mc_profile()
File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/decorator.py", line 5879, in construct_default_mc_profile
self.process_add_role_assignment_for_vnet_subnet(mc)
File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/acs/decorator.py", line 5229, in process_add_role_assignment_for_vnet_subnet
if not self.context.get_yes() and not prompt_y_n(
File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 71, in prompt_y_n
return _prompt_bool(msg, 'y', 'n', default=default, help_string=help_string)
File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 79, in _prompt_bool
verify_is_a_tty()
File "/opt/az/lib/python3.8/site-packages/knack/prompting.py", line 28, in verify_is_a_tty
raise NoTTYException()
knack.prompting.NoTTYException
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 create --resource-group {} --name {} --location {} --enable-managed-identity --kubernetes-version {} --vnet-subnet-id {} --docker-bridge-address {} --network-plugin {} --dns-service-ip {} --service-cidr {} --node-count {} --enable-cluster-autoscaler --min-count {} --max-count {} --ssh-key-value {} --load-balancer-sku {} --debug
Expected Behavior
Environment Summary
Linux-5.17.5-76051705-generic-x86_64-with-glibc2.34, Pop!_OS 22.04 LTS
Python 3.8.13
Installer: DEB
azure-cli 2.36.0
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
No worries @yonzhan @RakeshMohanMSFT, I’ve just realized that it’s my fault. I had a commented line between parameters so the command wasn’t launched correctly. Once fixed it works correctly.
Sorry for the inconvenience.
@enrique-palazuelos can you please help us with the --debug trace of the command you are running?