I am trying to upgrade my Service Fabric application via Visual Studio.
I ended up having to use the diff package approach to ensure that only the services I change are in the upgrade.
I did this via a command file which removed the non-required files.
Now I have walked into another error which is annoying with its lack of detail:
Start-ServiceFabricApplicationUpgrade : Default service descriptions can not be modified as part of upgrade. Modified
2>default service: fabric:/MYAPPLICATION/MYSERVICE. To allow it, set
2>EnableDefaultServicesUpgrade to true.
Where exactly do I put this?
Please note that this is coming from Visual Studio.
I rarely get any joy using PowerShell.
I have seen references to the Update-ServiceFabricService CmdLet, but there is no more information about exactly what I need to do.
I have tried this in the application manifest without success:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="MyServiceFabricApplication.ServiceFabricType" ApplicationTypeVersion="7.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="EnableDefaultServicesUpgrade" DefaultValue="true" />
<Parameter Name="MyParameter" DefaultValue="value" />
Parameters>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.Service1.ServiceFabricPkg" ServiceManifestVersion="4.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.Service2.ServiceFabricPkg" ServiceManifestVersion="2.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.Service3.ServiceFabricPkg" ServiceManifestVersion="3.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.Service4.ServiceFabricPkg" ServiceManifestVersion="2.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.PlatformApi.ServiceFabricPkg" ServiceManifestVersion="2.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.LivePriceManager.ServiceFabricPkg" ServiceManifestVersion="3.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceFabricApplication.Service5.ServiceFabricPkg" ServiceManifestVersion="3.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="appSettings">
<Parameter Name="MyParameter" Value="[MyParameter]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<DefaultServices>
<Service Name="Service1" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service1.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service2" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service2.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service3" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service3.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service7" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service7.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service5" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service5.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service6" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service6.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
<Service Name="Service4" ServicePackageActivationMode="ExclusiveProcess">
<StatelessService ServiceTypeName="MyServiceFabricApplication.Service4.ServiceFabricType">
<SingletonPartition />
</StatelessService>
</Service>
</DefaultServices>
</ApplicationManifest>
Paul
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…