Search code examples
azure-service-fabric

Service Fabric Application - changing instance count on application update fails


I am building a CI/CD pipeline to release SF Stateless Application packages into clusters using parameters for everything. This is to ensure environments (DEV/UAT/PROD) can be scoped with different settings.

For example in a DEV cluster an application package may have an instance count of 3 (in a 10 node cluster)

I have noticed that if an application is in the cluster and running with an instance count (for example) of 3, and I change the deployment parameter to anything else (e.g. 5), the application package will upload and register the type, but will fail on attempting to do a rolling upgrade of the running application.

This also works the other way e.g. if the running app is -1 and you want to reduce the count on next rolling deployment.

Have I missed a setting or config somewhere, is this how it is supposed to be? At present its not lending itself to being something that is easily scaled without downtime.

At its simplest form we just want to be able to change instance counts on application updates, as we have an infrastructure-as-code approach to changes, builds and deployments for full tracking ability.

Thanks in advance


Solution

  • This is a common error when using Default services.

    This has been already answered multiple times in these places:

    Default service descriptions can not be modified as part of upgrade set EnableDefaultServicesUpgrade to true

    https://blogs.msdn.microsoft.com/maheshk/2017/05/24/azure-service-fabric-error-to-allow-it-set-enabledefaultservicesupgrade-to-true/

    https://github.com/Microsoft/service-fabric/issues/253#issuecomment-442074878