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

江枫思渺然 提交于 2019-11-28 14:20:09

First, before I give you a solution, I will give a reason...

EnableDefaultServicesUpgrade is a flag to allow upgrading default services descriptions during application upgrades. When set to true, Default service descriptions are overwritten with new values, this is required to prevent accidental changes to the description that will cause possible failures or dataloss.

  • When set to false (default), it will make checks to prevent failures to happen,
  • When set to true, you assume the risk that these changes are safe

An example is when you change the number of partitions in a service and SF predict this will cause dataloss or other failures.

The fix:

EnableDefaultServicesUpgrade is a flag in the cluster definition, not in the service. You have to set this in your cluster manifest.

Your cluster manifest will have a section that looks like this:

...some stuff above...
{
  "name": "ClusterManager",
  "parameters": [
  {
    "name": "EnableDefaultServicesUpgrade",
    "value": true
  }]
  ... some more stuf below
 }

To change it on Azure:

You can use the portal 'http://resources.azure.com' as described in this link

On local cluster:

You copy the clusterconfig.json from the cluster installation folder, apply the changes a trigger a cluster upgrade using the following command Start-ServiceFabricClusterConfigurationUpgrade -ClusterConfigPath .\clusterconfig.json

By the way...

You are using DefaultServices, you should avoid it, there are quite a few questions on SO why.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!