What does 'the current update to this deployment has been preempted' error mean in Windows Azure?
-
28-10-2019 - |
Question
When scaling up a Windows Azure hosted service's instance count I occasionally get the following error when using the WAPP powershell cmdlets:
Get-OperationStatus : Failed: The current update to this deployment has been
preempted.At
D:\TFS\12\Deploy-Api\Sources\CloudServices\BuildProcessTemplates\DeploymentScripts\ChangeAllRolesInstanceCount.ps1:64 char:120
+ $deployment | Set-DeploymentConfiguration {$deployment.RolesConfiguration}
-ErrorVariable +err | Get-OperationStatus << -WaitToComplete -ErrorVariable +err;
+ CategoryInfo : CloseError: (:) [Get-OperationStatus], Exception
+ FullyQualifiedErrorId :
Microsoft.WindowsAzure.Samples.ManagementTools.PowerShell.Services.Common.GetOperationStatusCommand
I am scaling up by changing the instance count in the config, and then calling Set-DeploymentConfiguration with the new values.
Solution
We didn't find out what the error meant. The solution we came up with was to stop waiting for the operation to complete via the -WaitToComplete
flag and instead poll the status of the deployment using the Get-OperationStatus
until all the response said the operation was done.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow