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

Install script breaks Github action in 2.61 #28984

Closed
jimmystridh opened this issue May 17, 2024 · 6 comments · Fixed by #28990
Closed

Install script breaks Github action in 2.61 #28984

jimmystridh opened this issue May 17, 2024 · 6 comments · Fixed by #28990
Assignees
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@jimmystridh
Copy link

Describe the bug

We are running the install script at https://aka.ms/InstallAzureCLIDeb in a github action pipeline like this:

      - name: Install Azure CLI
        run: |
          sudo apt update && sudo apt-get install curl -y
          curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

this morning this was broken, and it seems like the reason is because the gpg installation breaks the script with

gpg: cannot open '/dev/tty': No such device or address
curl: (23) Failed writing body
Error: Process completed with exit code 2.

I did some digging by enabling a tty and it seems the gpg installation wants to ask for an okay to overwrite the file:
File '/etc/apt/keyrings/microsoft.gpg' exists. Overwrite? (y/N)

which I assume is due to the path changes in:
https://github.com/Azure/azure-cli/commit/655b05b15204ef8a5c76b7a5cd78cb489058530a

Related command

https://aka.ms/InstallAzureCLIDeb

Errors

gpg: cannot open '/dev/tty': No such device or address
curl: (23) Failed writing body
Error: Process completed with exit code 2.

Issue script & Debug output

not possible

Expected behavior

the install script installs az cli without error

Environment Summary

github action standard runner, before installation

Additional context

No response

@jimmystridh jimmystridh added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 17, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label May 17, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented May 17, 2024

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

@jimmystridh
Copy link
Author

I was able to work around the issue by completely removing the addition of the key:

- name: Install Azure CLI
        run: |
          sudo apt update && sudo apt-get install curl -y
          curl -sL https://aka.ms/InstallAzureCLIDeb -o installAzureCli.sh
          sed -i '/curl -sLS https:\/\/packages.microsoft.com\/keys\/microsoft.asc |/d' installAzureCli.sh
          sed -i '/gpg --dearmor -o \/etc\/apt\/keyrings\/microsoft.gpg/d' installAzureCli.sh
          sed -i '/chmod go+r \/etc\/apt\/keyrings\/microsoft.gpg/d' installAzureCli.sh
          sudo bash installAzureCli.sh

@boobboo
Copy link

boobboo commented May 17, 2024

I was able to work around the issue by completely removing the addition of the key:

- name: Install Azure CLI
        run: |
          sudo apt update && sudo apt-get install curl -y
          curl -sL https://aka.ms/InstallAzureCLIDeb -o installAzureCli.sh
          sed -i '/curl -sLS https:\/\/packages.microsoft.com\/keys\/microsoft.asc |/d' installAzureCli.sh
          sed -i '/gpg --dearmor -o \/etc\/apt\/keyrings\/microsoft.gpg/d' installAzureCli.sh
          sed -i '/chmod go+r \/etc\/apt\/keyrings\/microsoft.gpg/d' installAzureCli.sh
          sudo bash installAzureCli.sh

Thanks for the workaround, I also have had the same issue
Chris

@yonzhan yonzhan added 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 and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels May 17, 2024
@yonzhan yonzhan added this to the Backlog milestone May 17, 2024
@ajadams-T4
Copy link

ajadams-T4 commented May 17, 2024

This has also broken for me but i'm using VMSS in azure devops pipelines. I also found if you run this before it works

curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

@taco-coder
Copy link

I'm also running into this same issue using "ubuntu-latest" on Azure DevOps Pipelines. Really appreciate the work around.

fidencio added a commit to fidencio/kata-containers that referenced this issue May 17, 2024
This is done in order to work around
Azure/azure-cli#28984, following a suggestion
on the very same issue.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@bebound
Copy link
Contributor

bebound commented May 20, 2024

We've updated the script at https://aka.ms/InstallAzureCLIDeb to fix this issue.

datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 11, 2024
This is done in order to work around
Azure/azure-cli#28984, following a suggestion
on the very same issue.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 11, 2024
This reverts commit 5ff53e4, as the
script was fixed by MSFT, at least according to:
Azure/azure-cli#28984

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 17, 2024
This is done in order to work around
Azure/azure-cli#28984, following a suggestion
on the very same issue.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 17, 2024
This reverts commit 5ff53e4, as the
script was fixed by MSFT, at least according to:
Azure/azure-cli#28984

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 17, 2024
This is done in order to work around
Azure/azure-cli#28984, following a suggestion
on the very same issue.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
datadog-compute-robot pushed a commit to DataDog/kata-containers that referenced this issue Jun 17, 2024
This reverts commit 5ff53e4, as the
script was fixed by MSFT, at least according to:
Azure/azure-cli#28984

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants