Reputation: 3283
I have incremented the version of one of the services in my Service Fabric application.
However, when I try to upgrade the cluster I get the error below:
The content in CodePackage Name:Code and Version:1.0.0 in Service Manifest
3>'MYAPPLICATION.ServiceFabricPkg' has changed, but the version number is the same.
3>At C:\Program Files\Microsoft SDKs\Service
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-UpgradedServiceFabricApplication.ps1:135 char:38
This is a huge issue for me as one of the best selling points of Service Fabric is being able update one service without touching others.
Does anyone know a solution for this?
Research points to the error being related to compression, so I added
<CopyPackageParameters CompressPackage="false" />
to my Local5Node.xml file.
This makes no difference.
I am trying to do this via publish with Visual Studio 2017.
Cheers
Paul
Upvotes: 0
Views: 1255
Reputation: 969
I think you can have a problem when you have updated the service code, updated code version in the ServiceManifest.xml
but haven't updated the application version in ApplicationManifest.xml
.
Here are examples if you are updating you service from version 1.0.0 to 1.1.0.
Manual Approach
In ServiceManifest.xml
<CodePackage Name="Code" Version="1.1.0" />
<ServiceManifest Name="ServicePkg" Version="1.1.0" />
In ApplicationManifest.xml
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="ServicePkg" ServiceManifestVersion="1.1.0" />
<ConfigOverrides />
</ServiceManifestImport>
<ApplicationManifest ApplicationTypeName="AppType" ApplicationTypeVersion="1.1.0" />
Visual Studio Approach
Hope this helps.
Upvotes: 0
Reputation: 11351
This happens because you have updated the service binaries and didn't update the manifests with a new version number, the manifest points to the same version as before but the binaries are different.
Service fabric use the manifest versions to identify which services should be updated during an application upgrade, because you didn't set the new versions and the binaries has changed, it will rollback to avoid issues.
A quick search about this error return a few results with the reason for this, please take a look on these answers:
Error while upgrading Azure Service Fabric through VSTS CI/CD
Deployment for Service Fabric service version upgrade fails on VSTS Release
Upvotes: 1