Azure / Azure/azure-cli

az connectedk8s show : FAILURE.

Open
#32,505 4 comments 0 reactions 0 assignees View on GitHub
Auto-Resolve Connected Kubernetes customer-reported Possible-Solution Service Attention Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az connectedk8s show`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib64/az/lib/python3.6/site-packages/psutil/__init__.py)
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
self.commands_loader.load_arguments(command)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 515, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/lib64/az/lib/python3.6/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 367, in arguments_loader
cmd_args = self.load_getter_op_arguments(self.op_path)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 70, in load_getter_op_arguments
op = self.get_op_handler(getter_op_path)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/cloudshell-user/.azure/cliextensions/connectedk8s/azext_connectedk8s/custom.py", line 47, in
import azext_connectedk8s._clientproxyutils as clientproxyutils
File "/home/cloudshell-user/.azure/cliextensions/connectedk8s/azext_connectedk8s/_clientproxyutils.py", line 19, in
from psutil import process_iter, NoSuchProcess, AccessDenied, ZombieProcess, net_connections
File "/usr/lib64/az/lib/python3.6/site-packages/psutil/__init__.py", line 102, in
from . import _pslinux as _psplatform
File "/usr/lib64/az/lib/python3.6/site-packages/psutil/_pslinux.py", line 26, in
from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib64/az/lib/python3.6/site-packages/psutil/__init__.py)

```

## 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 connectedk8s show --name {} --resource-group {} --query {}`

## Expected Behavior

## Environment Summary
```
Linux-6.1.156-177.286.amzn2023.x86_64-x86_64-with-glibc2.34, Amazon Linux 2023.9.20251014
Python 3.9.24
Installer: RPM

azure-cli 2.38.2 *

Extensions:
k8s-extension 1.4.3
connectedk8s 1.9.2

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.