Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az aks get-credentials fails with 'Namespace' object has no attribute '_cmd' #20274

Closed
ghost opened this issue Nov 10, 2021 · 3 comments
Closed
Labels
AKS az aks/acs/openshift customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.

Comments

@ghost
Copy link

ghost commented Nov 10, 2021

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az aks get-credentials

Errors:

The command failed with an unexpected error. Here is the traceback:
'Namespace' object has no attribute '_cmd'
Traceback (most recent call last):
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/knack/parser.py", line 260, in parse_args
    return super().parse_args(args)
  File "/usr/local/lib/python3.9/argparse.py", line 1822, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2064, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2004, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/commands/arm.py", line 357, in __call__
    profile = Profile(cli_ctx=namespace._cmd.cli_ctx)  # pylint: disable=protected-access
AttributeError: 'Namespace' object has no attribute '_cmd'

To Reproduce:

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

  • az login --service-principal --username {client_id} --password={client_secret} --tenant my-custom-tenant.com
  • az aks get-credentials --name {} --resource-group {} --subscription {} --overwrite-existing

Expected Behavior

success of the command without an exception.

Environment Summary

Linux-5.10.47-linuxkit-x86_64-with-glibc2.28, Debian GNU/Linux 10 (buster)
Python 3.9.8
Installer: PIP

azure-cli 2.30.0

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 10, 2021
@yonzhan yonzhan added the AKS az aks/acs/openshift label Nov 10, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 10, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 10, 2021
@ghost
Copy link

ghost commented Nov 10, 2021

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 get-credentials

Errors:

The command failed with an unexpected error. Here is the traceback:
'Namespace' object has no attribute '_cmd'
Traceback (most recent call last):
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/knack/parser.py", line 260, in parse_args
    return super().parse_args(args)
  File "/usr/local/lib/python3.9/argparse.py", line 1822, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.9/argparse.py", line 2064, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/lib/python3.9/argparse.py", line 2004, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/opt/venv_azure_cli/lib/python3.9/site-packages/azure/cli/core/commands/arm.py", line 357, in __call__
    profile = Profile(cli_ctx=namespace._cmd.cli_ctx)  # pylint: disable=protected-access
AttributeError: 'Namespace' object has no attribute '_cmd'

To Reproduce:

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

  • az login --service-principal --username {client_id} --password={client_secret} --tenant my-custom-tenant.com
  • az aks get-credentials --name {} --resource-group {} --subscription {} --overwrite-existing

Expected Behavior

success of the command without an exception.

Environment Summary

Linux-5.10.47-linuxkit-x86_64-with-glibc2.28, Debian GNU/Linux 10 (buster)
Python 3.9.8
Installer: PIP

azure-cli 2.30.0

Additional Context

Author: jonas-weismueller-by
Assignees: -
Labels:

Service Attention, AKS, customer-reported

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 10, 2021

route to service team

@jiasli
Copy link
Member

jiasli commented Nov 11, 2021

It's very likely to be related to #20269.

@jiasli jiasli closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS az aks/acs/openshift customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants