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

Exception raised when executing any Azure CLI command after upgrading to version 2.57. #28312

Closed
ptsapralis opened this issue Feb 6, 2024 · 4 comments · Fixed by #28387
Closed
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot customer-reported Issues that are reported by GitHub users external to the Azure organization. Network az network vnet/lb/nic/dns/etc... question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@ptsapralis
Copy link

Describe the bug

After upgrading to Azure CLI, version 2.57, when executing any command, I receive the following error message:

Suppress exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/main.py", line 62, in
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/main.py", line 55, in
sys.exit(exit_code)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/decorators.py", line 79, in _wrapped_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/telemetry.py", line 532, in _get_secrets_warning_config
show_secrets_warning = _get_config().getboolean('clients', 'show_secrets_warning', fallback=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/knack/config.py", line 147, in getboolean
raise ValueError('Not a boolean: {}'.format(val))
ValueError: Not a boolean: None

Commands seem to execute successfully (I could list/deallocate/start virtual machines, manage virtual networks, etc.). The issue occurs on different platforms: I tested on Ubuntu Linux server ver.22.04, Mac OS Sonoma (on Apple Silicon), WSL on Windows Server 2022 Enterprise Azure Edition, command window on Windows Server 2022 Enterprise Azure Edition).

Related command

Examples:

az vm list --subscription SUB-DEVANDTEST --verbose -o table
az network vnet subnet list --subscription SUB-DEVANDTEST --verbose -o table -g RG_BAGVIRTUALNETWORKS --vnet-name BAGVIRTUALNETWORK

The issue appears with almost every Azure CLI command.

Errors

Suppress exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/main.py", line 62, in
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/main.py", line 55, in
sys.exit(exit_code)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/decorators.py", line 79, in _wrapped_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/telemetry.py", line 532, in _get_secrets_warning_config
show_secrets_warning = _get_config().getboolean('clients', 'show_secrets_warning', fallback=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/knack/config.py", line 147, in getboolean
raise ValueError('Not a boolean: {}'.format(val))
ValueError: Not a boolean: None

Issue script & Debug output

Output with --debug option is much too long to enter in here - can be shared in a separate e-mail message if required.

Expected behavior

Expecting Azure CLI statements to execute successfully without raising an exception.

Environment Summary

{
"azure-cli": "2.57.0",
"azure-cli-core": "2.57.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

Additional context

No response

@ptsapralis ptsapralis added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 6, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Network az network vnet/lb/nic/dns/etc... labels Feb 6, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 6, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 6, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Compute az vm/vmss/image/disk/snapshot label Feb 6, 2024
@yonzhan yonzhan added this to the Backlog milestone Feb 6, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 6, 2024
@evelyn-ys
Copy link
Member

evelyn-ys commented Feb 7, 2024

Please run az config set clients.show_secrets_warning=False as a workaround. For more details, see hardening-your-defense-in-depth-with-secrets-awareness-in-azure

I'll look into this issue ASAP! Thanks for reporting!

@evelyn-ys
Copy link
Member

evelyn-ys commented Feb 7, 2024

Hi @ptsapralis, This is a exception trace of suppressed exception. Your CLI command won't be affected and will successfully return as expected.

This is a small issue on collecting telemetry and we will fix in next version

@ptsapralis
Copy link
Author

ptsapralis commented Feb 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot customer-reported Issues that are reported by GitHub users external to the Azure organization. Network az network vnet/lb/nic/dns/etc... question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
6 participants