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

[Question]: AzureFileCopy started to fail on 21st Aug @ just after 12:30 BST. #18859

Closed
1 of 4 tasks
AndrewBates666 opened this issue Aug 23, 2023 · 34 comments
Closed
1 of 4 tasks
Labels
Area: Release Area:RM RM task team p1 Priority 1 (should have immediate attention) Task:AzureFileCopy

Comments

@AndrewBates666
Copy link

Task name

AzureFilecopy

Task version

5.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

Windows 2019 Datacenter

Operation system

Windows 2019 Datacenter

Question

Hi, we have started seeing a problem resolving the Sanitizer module in the above task. The AzureFileCopy task copies a file from a Storage Account onto the C:\temp folder on an Azure Windows VM running Server 2019 Datacenter.

The log implies that the module has been loaded:

2023-08-23T14:15:20.7037529Z ##[debug]Loading module from path 'D:\a\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\5.227.0\ps_modules\Sanitizer\Sanitizer.psm1'.
2023-08-23T14:15:20.7118086Z ##[debug]Loading resource strings from: D:\a\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\5.227.0\ps_modules\Sanitizer/module.json

But when the script is attempting to run on the VM the following error is reported:

2023-08-23T14:16:43.6557692Z -ExecutionPolicy Unrestricted -Command ". 
2023-08-23T14:16:43.6558018Z 'C:\Users\adminuser\AppData\Local\Temp\e9f131e0-0904-4611-b60a-30f412e6b24b.ps1'"
2023-08-23T14:16:43.6558122Z 
2023-08-23T14:16:43.7348294Z Import-Module : The specified module 'C:\Users\adminuser\AppData\Local\Temp\ps_modules\Sanitizer' 
2023-08-23T14:16:43.7348885Z At line:1 char:1
2023-08-23T14:16:43.7349175Z + & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoLogo ...
2023-08-23T14:16:43.7349583Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-23T14:16:43.7350327Z     + CategoryInfo          : NotSpecified: (Import-Module :...les\Sanitizer' :String) [], RemoteException
2023-08-23T14:16:43.7350704Z     + FullyQualifiedErrorId : NativeCommandError
2023-08-23T14:16:43.7350922Z  
2023-08-23T14:16:43.7351127Z 
2023-08-23T14:16:43.7455112Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:43.7455461Z 
2023-08-23T14:16:44.5304389Z was not loaded because no valid module file was found in any module directory.
2023-08-23T14:16:44.5304948Z 
2023-08-23T14:16:44.5307796Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5308138Z 
2023-08-23T14:16:44.5308764Z At C:\Users\adminuser\AppData\Local\Temp\4cb675ed-e14c-457a-afc7-0a219eb60a0b.ps1:11 char:5
2023-08-23T14:16:44.5309112Z 
2023-08-23T14:16:44.5311649Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5311802Z 
2023-08-23T14:16:44.5312085Z +     Import-Module $PSScriptRoot\ps_modules\Sanitizer
2023-08-23T14:16:44.5312166Z 
2023-08-23T14:16:44.5312943Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5313071Z 
2023-08-23T14:16:44.5313211Z +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-23T14:16:44.5313283Z 
2023-08-23T14:16:44.5313848Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5314121Z 
2023-08-23T14:16:44.5314302Z     + CategoryInfo          : ResourceUnavailable: (C:\Users\adminu...dules\Sanitizer:String) [Imp 
2023-08-23T14:16:44.5314404Z 
2023-08-23T14:16:44.5315085Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5315202Z 
2023-08-23T14:16:44.5315430Z    ort-Module], FileNotFoundException
2023-08-23T14:16:44.5315497Z 
2023-08-23T14:16:44.5315880Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-08-23T14:16:44.5316004Z 
2023-08-23T14:16:44.5316182Z     + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Any advice on how to resolve this problem? Thanks Andy
@starkmsu
Copy link
Contributor

@AndrewBates666 , please post exact task version that gives you that error. I mean like this - 5.xxx.yyy.

@AndrewBates666
Copy link
Author

It is the standard Azure File Copy task in Azure release pipelines; the only version info I can see is 5.*. Where can I see the full version? Also is it possible to use an old version of a task. This seems to be a problem that is starting to affect other users. See here: #18809

@v-mohithgc
Copy link
Contributor

It is the standard Azure File Copy task in Azure release pipelines; the only version info I can see is 5.*. Where can I see the full version? Also is it possible to use an old version of a task. This seems to be a problem that is starting to affect other users. See here: #18809

Hi, the task version will be visible in task logs, for example:
image

can you please check and confirm the task version in your recent failure pipelines?

Thanks

@AndrewBates666
Copy link
Author

5.227.0.

@LeftTwixWand
Copy link
Contributor

@AndrewBates666 are you sure that you use Microsoft-hosted agent, not self-hosted agent?

@marcusrichards
Copy link

We are having the exact same problem on all our pipelines, which are running as Microsoft-hosted agents. Highly critical as it is blocking our VM deployments.

@AndrewBates666
Copy link
Author

We're using the standard Azure DevOps Microsoft-hosted agents and release pipeline. All tasks using AzureFilecopy are failing with the Sanitizer error. Yes, all of our VMs can't currently be deployed so it is critical for us as well.

@v-mohithgc
Copy link
Contributor

Hello everyone, please check and try to run your pipelines now, and if your using Microsoft hosted agents, task should be able to fetch version 5.226.1 (previous working version)
If your using self-hosted agent, please try to clear the cache of 5.227.0 and agents should be able to pick task version 5.226.1.
If you're using YAML pipeline, you can define the task version as 5.226.1 and try to run it.

Thanks!

@marcusrichards
Copy link

How do we change the classic pipeline task version from 5.* to 5.226.1 ? The drop down for task version only has 5., 4., 3* etc?

@v-mohithgc
Copy link
Contributor

v-mohithgc commented Aug 24, 2023

How do we change the classic pipeline task version from 5.* to 5.226.1 ? The drop down for task version only has 5., 4., 3* etc?

there is no need to change, if your using Microsoft hosted agent you can just re-run the pipeline and the agent should be able to automatically pick version 5.226.1.
Once you re-run let me know if your agent is not able to pick task version 5.226.1.
you can verify the task version in task logs only.
for example:
image

@marcusrichards
Copy link

I reran and it picked up 5.226.1 but error : throw "Failed while downloading azcopy.exe from the URL w .

I will upload log file now

@marcusrichards
Copy link

marcusrichards commented Aug 24, 2023

171377_logs_14.txt

I have had to remove some security information so new upload

@v-mohithgc
Copy link
Contributor

171377_logs_14.txt

I have had to remove some security information so new upload

@marcusrichards going by the error message, this doesn't look to be an issue from the task end, it's something to do with your pipeline configuration.

@AndrewBates666 and others can you all confirm if the reverted version of 5.226.1 is showing a similar error or working fine for you all?

@PonYehudak
Copy link

i have the same problem, but i am using task# 2, and it is still picking 2.227.3 and not 2.226.1
how can i get it to pick up 2.226.1?

@v-mohithgc
Copy link
Contributor

i have the same problem, but i am using task# 2, and it is still picking 2.227.3 and not 2.226.1 how can i get it to pick up 2.226.1?

AzureFileCopyV2 hasn't been reverted to 226.1 yet, please try if V4 or V5 version can be used.

@PonYehudak
Copy link

PonYehudak commented Aug 24, 2023

@v-mohithgc
when i use v4 or v5 i get other errors, i don't have time to try and solve them now.
When will V2 be reverted?

@Griffa87
Copy link

@v-mohithgc testing this now. Pipeline is running so will update once complete

@v-mohithgc
Copy link
Contributor

when i use v4 or v5 i get other errors, i don't have time to try and solve them now. When will V2 be reverted?

I have informed the relevant team, they're on it, meanwhile can you confirm the version of your last success run using v2?

@Griffa87
Copy link

I can confirm it now works @v-mohithgc using AzureFileCopy 5.226.1.

@PonYehudak
Copy link

when i use v4 or v5 i get other errors, i don't have time to try and solve them now. When will V2 be reverted?

I have informed the relevant team, they're on it, meanwhile can you confirm the version of your last success run using v2?

2.226.1

@Griffa87
Copy link

I can confirm it now works @v-mohithgc using AzureFileCopy 5.226.1.

One thing we have noticed @v-mohithgc since using 5.226.1 are a few warnings. I am not sure if they are caused by us or the AzureFileCopy code. But they are as follows.

2023-08-24T11:35:45.3699679Z ##[warning]Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide

2023-08-24T11:36:23.1642944Z ##[warning]The names of some imported commands from the module 'Microsoft.Azure.PowerShell.Cmdlets.Network' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

2023-08-24T11:36:26.4002205Z ##[warning]The names of some imported commands from the module 'Az.Network' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

@LeftTwixWand
Copy link
Contributor

LeftTwixWand commented Aug 24, 2023

@AndrewBates666 and @PonYehudak can you also share the link of failing pipeline, so we can investigate it further.
The format should be like this:
https://dev.azure.com/{organization}/{project}/_build/results?buildId={id}&view=results

@PonYehudak
Copy link

@Griffa87
Copy link

@LeftTwixWand Andrew and I are on the same team and its working our side. Thanks

@marcusrichards
Copy link

171377_logs_14.txt
I have had to remove some security information so new upload

@marcusrichards going by the error message, this doesn't look to be an issue from the task end, it's something to do with your pipeline configuration.

Thank you. I upgraded the remote VM and everything is now running ok. Thanks for your super quick response 👍

@LeftTwixWand
Copy link
Contributor

Hey @Griffa87, @AndrewBates666 and @PonYehudak thank you all for the help.

I would like to ask you to share the full pipeline log of your first run, where you faced the issue.
You can download it here:
image

If you are concerned about safety, you can send it on my Microsoft email: [email protected]

@Griffa87
Copy link

I have emailed you @LeftTwixWand

@PonYehudak
Copy link

@LeftTwixWand - Also I have emailed you

@v-mohithgc v-mohithgc added Area:RM RM task team Task:AzureFileCopy p1 Priority 1 (should have immediate attention) and removed triage labels Aug 25, 2023
@v-mohithgc
Copy link
Contributor

v-mohithgc commented Aug 25, 2023

@v-mohithgc when i use v4 or v5 i get other errors, i don't have time to try and solve them now. When will V2 be reverted?

V2 has been reverted to 2.226.1, please rerun and check.

Thanks

@LeftTwixWand
Copy link
Contributor

Hey @Griffa87 and @PonYehudak thank you so much for sharing these details.
It's extremely helpful.

@AlehPatskevich
Copy link

Try to add addition azure powershell task with inline sript before your azure file copy task
Azcopy login --service-principal --application-id "your subscription application id" --tenant-id="your tenant" --aad-endpoint "https://login.windows.net/"

Have another problem but found this bug.

@PonYehudak
Copy link

@v-mohithgc when i use v4 or v5 i get other errors, i don't have time to try and solve them now. When will V2 be reverted?

V2 has been reverted to 2.226.1, please rerun and check.

Thanks

Works now,
Thank you.

@AndrewBates666
Copy link
Author

AndrewBates666 commented Sep 6, 2023 via email

@v-mohithgc
Copy link
Contributor

This issue is now resolved.
V228.1 will be containing the fix, which will be out by tomorrow to all the regions.
Feel free to reopen this issue if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Release Area:RM RM task team p1 Priority 1 (should have immediate attention) Task:AzureFileCopy
Projects
None yet
Development

No branches or pull requests

8 participants