We are deploying a Sitecore
web application via CI/CD in Octopus
to an Azure Staging slot
.
The deployment randomly fails with the following error:
New-AzureRMWebAppSlot : Cannot acquire exclusive lock to create, update or
At C:\Octopus\Work\20180727035133-565589-870\Script.ps1:5 char:1
+ New-AzureRMWebAppSlot -Name TestCM -Slot Staging -ResourceGroupNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmWebAppSlot], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots.NewAzureWebAppSlotCmdlet
The remote script failed with exit code 1
The action Create and Deploy Staging Slot CM on the Octopus Server failed
The error does not always occur.
I followed microsoft's docs on checking for locks in Azure Portal
and none are showing up.
How do I fix (or prevented) this issue ?