Azure Service Fabric Local Cluster - Start-ServiceFabricApplicationUpgrade fail to run

senglory 1 Reputation point


I am trying to write a PS script per [service-fabric-application-upgrade-tutorial-powershell][1]

[1]: this article but it throws the following exception:

> Start-ServiceFabricApplicationUpgrade : The default service description for 'fabric:/TrendScanner/WebApiAqQuality' was modified as part of upgrade, which is not allowed. TargetReplicaSetSize has changed from '1' to '-1'. To
> allow the modification, set EnableDefaultServicesUpgrade to true following Note, at the start of the application upgrade, there may
> be three descriptions of a default service: (1) the description with which it was last created (2) the description with which it is currently running, which could diverge from (1) because of Update-ServiceFabricService API call
> and (3) the description in the target manifest. This error is about the difference between the descriptions (1) and (3). For more details, refer to
> At C:\temp\UpdateTrendScannerLITE.ps1:32 char:1
> + Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/Trend ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Start-ServiceFabricApplicationUpgrade], FabricException
> + FullyQualifiedErrorId : UpgradeApplicationErrorId,Microsoft.ServiceFabric.Powershell.StartApplicationUpgrade

Tried to run the following script before updating:

Connect-ServiceFabricCluster -ConnectionEndpoint $azureServiceFabricClusterUrl  
Update-ServiceFabricService -Stateless 'fabric:/TrendScanner/WebApiAqQuality' -InstanceCount -1   

but nothing changed after this code's execution, the Start-ServiceFabricApplicationUpgrade still fail with the same exception. What should I do to eliminate the error?

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
257 questions
{count} votes