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.

AZ AKS is no longer working. How can I downgrade to the previous version?

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az aks upgrade

Errors:

The command failed with an unexpected error. Here is the traceback:
bad magic number in 'pkg_resources.extern.packaging.tags': b'3\r\r\n'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 556, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/__init__.py", line 515, in load_arguments
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 313, in load_arguments
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/commands.py", line 104, in load_arguments
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
  File "importlib\__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\edaroczy\.azure\cliextensions\aks-preview\azext_aks_preview\custom.py", line 133, in <module>
    from .vendored_sdks.azure_mgmt_preview_aks.v2022_01_02_preview.models import (
  File "C:\Users\edaroczy\.azure\cliextensions\aks-preview\azext_aks_preview\vendored_sdks\__init__.py", line 6, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\pkg_resources/__init__.py", line 83, in <module>
  File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\pkg_resources/_vendor/packaging/specifiers.py", line 24, in <module>
  File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\pkg_resources/_vendor/packaging/utils.py", line 8, in <module>
ImportError: bad magic number in 'pkg_resources.extern.packaging.tags': b'3\r\r\n'

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 upgrade

Expected Behavior

Environment Summary

Windows-10-10.0.19043-SP0
Python 3.10.3
Installer: MSI

azure-cli 2.35.0

Extensions:
aks-preview 0.5.56
subscription 0.1.4

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eugen-nwcommented, Apr 21, 2022

I ended up uninstalling Azure CLI from the Add/Remove programs and installing it again from the web. Exact same version - I think 2.35 - and it worked on the second try. Somehow the upgrade may have gotten into a confused state.

0reactions
RakeshMohanMSFTcommented, Apr 19, 2022

@eugen-nw Unfortunately there is no support for rollback to previous AKS versions. But you can create a second cluster on the side and then redeploy your manifests to have a similar copy.

Also I was able to upgrade my cluster with similar environment as yours Command I used az aks upgrade --kubernetes-version 1.22.6 --name Issue4655 --resource-group Issue4655 azure-cli 2.35.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downgrade or enable backward compatibility to previous ...
1 Answer ... As discussed with AKS team, currently there is no support for rollback to previous AKS versions or enable some environment ......
Read more >
Upgrading an AKS cluster | Migrating Applications to the ...
This will display the available version upgrade that's available for you. Note that once you've upgraded, you can not downgrade an AKS cluster....
Read more >
Solution to Azure Kubernetes Service version not supported ...
Here's the Azure CLI command I used to get the version. This tells the Azure CLI to only output the orchestrators array in...
Read more >
Updating an Amazon EKS cluster Kubernetes version
If any of these checks fail, Amazon EKS reverts the infrastructure deployment, and your cluster remains on the prior Kubernetes version. Running applications ......
Read more >
How to Install Azure CLI (Windows, Linux, macOS ...
Now run az --version to confirm the Azure CLI works and what ... If you're not comfortable with PowerShell, you can always install...
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