runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

MSFT Self Hosted Agents - azure-cli 2.26.0 * is causing issues

Open SudhirNune opened this issue 5 years ago • 9 comments

Description

Build Pipelines are failing when the AZCLI version azure-cli 2.26.0 is being used by the Microsoft Agents (Microsoft Hosted Agent)

Started to observe issue 14-Jul-2021 9:54 PM CDT

Git HUB Issue: https://github.com/Azure/azure-cli/issues/18860, this confirms the issue is with the CLI Version and a new version is release 2.26.1, however the agents are still trying to import 2.26.0, and causing the failures

acr run command fails with below error:

ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: ‘NoneType’ object is not callable Traceback (most recent call last): File “/opt/az/lib/python3.6/site-packages/knack/cli.py”, line 231, in invoke cmd_result = self.invocation.execute(args) File “/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py”, line 657, in execute raise ex File “/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py”, line 720, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File “/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py”, line 691, in _run_job result = cmd_copy(params) File “/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py”, line 328, in call return self.handler(*args, **kwargs) File “/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py”, line 121, in handler return op(**command_args) File “/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/run.py”, line 93, in acr_run variant=platform_variant TypeError: ‘NoneType’ object is not callable To open an issue, please run: 'az feedback

Virtual environments affected

  • [ ] Ubuntu 16.04
  • [ ] Ubuntu 18.04
  • [X] Ubuntu 20.04
  • [ ] macOS 10.15
  • [ ] macOS 11
  • [ ] Windows Server 2016
  • [ ] Windows Server 2019

Image version and build link

Issue with - azure-cli installation - azure-cli 2.26.0

Is it regression?

No

Expected behavior

Should not be bulling the azure-cli 2.26.0, as latest version if pushed by AZCLI team - 2.26.1 (Fixed Version), as per the below git issue update.

https://github.com/Azure/azure-cli/issues/18860

Actual behavior

New Agents which are getting created on or after the AZCLI 2.26.1 is released still using AZCLI2.26.0

Repro steps

  1. Spin up the MSFT Hosted Agent
  2. Create build pipeline with az acr run command

SudhirNune avatar Jul 15 '21 11:07 SudhirNune

Hi @SudhirNune! VM images were generated on July 11, azure-cli 2.26.1 was not available at that moment. New images with the updated version will be deployed next week. The following steps can be used to update azure-cli in runtime:

Ubuntu:

sudo apt-get remove azure-cli
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get update
sudo apt-get install azure-cli

Windows:

$azCliUrl = "https://github.com/Azure/azure-cli/releases/download/azure-cli-2.24.2/azure-cli-2.24.2.msi"
$azCliName = [IO.Path]::GetFileName($azCliUrl)
Install-Binary -Url $azCliUrl -Name $azCliName -ArgumentList ("/qn", "/norestart")

macOS:

brew upgrade azure-cli

miketimofeev avatar Jul 15 '21 11:07 miketimofeev

@miketimofeev - Next week is too late for a lot of people, can't we release a BUG FIX immediately, which can help us close this issue ? Also do you have a date when you were planning to push the update ?

SudhirNune avatar Jul 15 '21 11:07 SudhirNune

@SudhirNune the rollout process takes 3-4 days to accomplish. We're going to start the rollout on Monday and finish on Wednesday-Thursday.

miketimofeev avatar Jul 15 '21 12:07 miketimofeev

We have been completely stopped for 24hs now, we need to release stuff and are completely stuck. Not nice.

JotaP avatar Jul 16 '21 07:07 JotaP

I have a whole development team blocked by this bug, we need to keep updating and it is not possible, please fix it as soon as possible, thanks.

mrodrigo-nexplore avatar Jul 16 '21 07:07 mrodrigo-nexplore

We have successfully applied this workaround to our pipelines to get them to work again: https://github.com/actions/virtual-environments/issues/3735#issuecomment-880623386. Thanks @miketimofeev

JotaP avatar Jul 16 '21 08:07 JotaP

@miketimofeev - Do you have an update ?

SudhirNune avatar Jul 20 '21 15:07 SudhirNune

@SudhirNune all the macOS images were updated with the azure-cli 2.26.1. Windows and Ubuntu images rollout are in progress, some customers may expect the new version today, the rest will receive it tomorrow.

miketimofeev avatar Jul 20 '21 15:07 miketimofeev

@SudhirNune all the images were updated. I'm going to close the issue. Please feel free to contact us if you have any concerns. Thank you!

miketimofeev avatar Jul 21 '21 12:07 miketimofeev