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

[sonic-mgmt] install newest az-cli to mitigate old version az-cli issue #15621

Merged
merged 2 commits into from
Jun 25, 2023

Conversation

yejianquan
Copy link
Contributor

Why I did it

Fix the issue that azure-cli version is too old.
With apt-get install, we will install the old version of azure-cli: (2.0.81+ds-4ubuntu0.2)
This version can't use azure keyvault command: Azure/azure-cli#17981
Following https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions to install the newest version of azure-cli

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@yejianquan yejianquan requested a review from lguohan as a code owner June 25, 2023 08:24
@yejianquan
Copy link
Contributor Author

yejianquan commented Jun 25, 2023

Fix the issue that brought by: https://github.com/sonic-net/sonic-buildimage/pull/15472/files

docker exec sonic-mgmt bash -c az keyvault secret download --vault-name 'xxx' --name 'xxx' --file xxxxx.json
usage: az keyvault secret download [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv,yaml,none}]
[--query JMESPATH]
[--subscription _SUBSCRIPTION] --file
FILE_PATH [--vault-name NAME]
[--name SECRET_NAME]
[--encoding {utf-8,utf-16le,utf-16be,ascii,base64,hex}]
[--version SECRET_VERSION]
[--id IDENTIFIER]
az keyvault secret download: error: No module named 'azure.keyvault.key_vault_id'

&&apt-get install -y ca-certificates \
curl \
apt-transport-https \
lsb-release gnupg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you take this chance to move installation of the dependencies to the top apt-get install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refined

@wangxin wangxin merged commit 6bb0483 into sonic-net:master Jun 25, 2023
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
…ue (sonic-net#15621)

Force merge to work around the az-cli installation issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants