question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aks create is invalid

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az aks create

Errors:

The operation 'azure.cli.command_modules.acs.custom#aks_create' is invalid.
Traceback (most recent call last):
python2.7/site-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 482, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 275, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
...
azure/cli/core/__init__.py, ln 464, in default_arguments_loader
    op = handler or self.get_op_handler(operation, operation_group=kwargs.get('operation_group'))
azure/cli/core/__init__.py, ln 511, in get_op_handler
    raise ValueError("The operation '{}' is invalid.".format(operation))
ValueError: The operation 'azure.cli.command_modules.acs.custom#aks_create' is invalid.

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 {} --node-count {} --service-principal {} --client-secret {} --generate-ssh-keys

Expected Behavior

Environment Summary

Linux-3.10.0-957.12.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
Python 2.7.5
Shell: bash

azure-cli 2.0.66

Additional Context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jnollercommented, Jul 18, 2019

This is a definite bug.

Looking at the stack trace, its more than likely due to a Python 3 vs Python 2 issue in the command line or the extension. Any Redhat Linux flavor (Centos, Fedora, etc) has Python2 pinned to the default version. The stack trace is occurring when the core CLI is loading the AKS extension to the CLI. I’ve seen reports of issues like this in the past where Python 3 native syntax has been added to the AKS extension.

^^ @jluk

1reaction
rchamberlin-amplerocommented, Jun 25, 2019

I’m seeing similar having just done a yum update in Centos. Specifically az aks list was failing with the following: The command failed with an unexpected error. Here is the traceback:

The operation ‘azure.cli.command_modules.acs.custom#aks_list’ is invalid. Traceback (most recent call last): File “/usr/lib64/az/lib/python2.7/site-packages/knack/cli.py”, line 206, in invoke cmd_result = self.invocation.execute(args) File “/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/init.py”, line 482, in execute self.commands_loader.load_arguments(command) File “/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/init.py”, line 275, in load_arguments self.command_table[command].load_arguments() # this loads the arguments via reflection File “/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/init.py”, line 282, in load_arguments super(AzCliCommand, self).load_arguments() File “/usr/lib64/az/lib/python2.7/site-packages/knack/commands.py”, line 97, in load_arguments cmd_args = self.arguments_loader() File “/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/init.py”, line 464, in default_arguments_loader op = handler or self.get_op_handler(operation, operation_group=kwargs.get(‘operation_group’)) File “/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/init.py”, line 511, in get_op_handler raise ValueError(“The operation ‘{}’ is invalid.”.format(operation)) ValueError: The operation ‘azure.cli.command_modules.acs.custom#aks_list’ is invalid.

I was able to get things working by downgrading azure-cli to 2.0.65 so I think there is a regression in 2.0.66 here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing or invalid service principal when creating an AKS ...
Troubleshoot a missing or invalid service principal when you try to create an Azure Kubernetes Service (AKS) cluster.
Read more >
az aks create fails to obtain SP credentials · Issue #9585
Describe the bug Failed to create aks cluster using command line az ... Details: The credentials in ServicePrincipalProfile were invalid.
Read more >
Unable to create AKS Cluster using CLI
1 Answer 1 · Please Check the resource group exists before creating the cluster. · Please move the id_rsa and id_rsa.pub files under...
Read more >
Deployment on Azure AKS — Dataiku DSS 8.0 ...
Follow Azure's documentation on how to create your AKS cluster. We recommend that you allocate at least 8GB of memory for each cluster...
Read more >
Azure ML fails to deploy to inference cluster (Invalid overwrite ...
task: AzureCLI@1 displayName: "Deploy to AKS (CLI)" inputs: azureSubscription: 'Azure ML Workspace' scriptLocation: inlineScript workingDirectory: $(Build.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found