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

senglory 1 Reputation point
2020-06-21T21:38:41.49+00:00

Hi,

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 https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-fabric-settings. 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 https://aka.ms/upgrade-defaultservices
> 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:

$azureServiceFabricClusterUrl="dev-pdc:19000"  
  
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.
252 questions
{count} votes