Azure-pipelines-tasks: AzureRmWebAppDeployment\2.1.6 fails to stop聽site so dll handles are not released, causing release to fail

Created on 21 Dec 2016  路  10Comments  路  Source: microsoft/azure-pipelines-tasks

publishing a dotnet core app which, in this case, is referencing IdentityModel.dll (where it fails), and some other non-core assemblies.

We've been able to get the deployment to work from VS if we stop the slot first.

4_Deploy AzureRM App Service ....zip

Release

Most helpful comment

@JoeBrockhaus , thanks for your feedback.
We already added 'rename locked files' feature in 3.0-preview version of the task.
image

This task is available in most of the regions and will be available to all the regions in a week or two.

All 10 comments

@JoeBrockhaus thanks for reporting the error. We are analyzing it. Is is happening consistently or intermediate one ?

@JoeBrockhaus , is the issue resolved ?

sorry for the delayed response guys.聽

Initially it was happening consistently.

~As of this morning, using the 2.1.8 version, it looks like things聽are working as expected.~

jk, it's back - still broken.

@JoeBrockhaus, thanks for the response.

FILE_IN_USE issue occurs when DLL鈥檚 are locked. App_offline is believed to bring the app service down and unlock the resource. But the latest ASP.NET Core module expects app_offline.htm in root folder, but MSDeploy provides App_Offline.htm( case-sensitive). This issue is already in an active github issue with ASP.net repo and they informed that it will be fixed soon.

You can stop the App Service, Deploy the app and then start the app service to avoid FILE_IN_USE issue.

Please refer to this thread to manage app service via Build/Release.

@vincentdass聽ideally we would prefer聽a zero-downtime deployment. ie: uncheck the 'take聽app offline' box on the VSTS task.

Is that expected to be supported?

@JoeBrockhaus , For zero downtime deployment, You can deploy to a staging slot and then swap with production.
You can use Azure App Service Manage Task for Managing Azure App Service.
If dll's are locked in slots, then you need to Stop-Deploy-Start the slot.

@JoeBrockhaus , Can you please explain what will be the issue with swap slots ?

We've moved away from slot swaps for a few reasons.

It's unclear if the dll locking is an issue with the platform, the聽specific dll, the deployment task, etc, and it is easy for the buck to keep getting passed around as a result. Especially since this never happened before, the natural question is what changed that suddenly now it's not possible, and will things change again that would prevent us from needing to take these steps?聽

Doing some quick rabbit-hole tracking, I can see many others have posted questions with these same issues and聽I'm not the only one聽who finds the run-around and fix-it-for-now solutions frustrating. I understand you guys are probably in the same boat - you are simply working with聽what you're able to as part of the platform.

Does this open issue you refer to change the eventual need to stop/start and/or swap slots? https://github.com/Microsoft/vsts-tasks/issues/1607#issuecomment-272804191

I also see mention of an app setting potentially solving the problem, and also that this should be done automatically during the deployment, but it too feels like a temporary hack, at best. MSDEPLOY_RENAME_LOCKED_FILES = 1

@JoeBrockhaus , thanks for your feedback.
We already added 'rename locked files' feature in 3.0-preview version of the task.
image

This task is available in most of the regions and will be available to all the regions in a week or two.

Closing this as there is another issue tracking the same, we will communicate on that issue once it is resolved by Azure Team https://github.com/Microsoft/vsts-tasks/issues/3312

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jared-hexagon picture jared-hexagon  路  3Comments

alexszilagyi picture alexszilagyi  路  3Comments

gregpakes picture gregpakes  路  3Comments

montebhoover picture montebhoover  路  3Comments

jabbera picture jabbera  路  3Comments