0

I have a CD task setup for each of the 4 services in Azure Service Fabric using VSTS. Following is the configuration for all 4 tasks (except they point to different folders for different services) :

enter image description here

Problems :

1.For the first two applications, even though I have checked "Skip upgrade for same Type and Version", I am noticing that the task still removes the application, unregisters the type and redoes it for the same application type and version. Here are the sample logs :

2018-01-24T02:48:36.6728272Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\PublishEventApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:48:39.4305864Z An application with name 'fabric:/PublishEvent' already exists in the cluster with application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0'. Removing it.
2018-01-24T02:48:43.9333176Z Remove application instance succeeded
2018-01-24T02:48:44.3244542Z Application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0' was already registered with the cluster, unregistering it...
2018-01-24T02:48:48.8107130Z Unregister application type succeeded.
2018-01-24T02:48:48.8153978Z Copying application to image store...
2018-01-24T02:48:53.7676773Z Upload to Image Store succeeded
2018-01-24T02:48:53.7694089Z Registering application type...
2018-01-24T02:49:05.0363332Z Register application type succeeded
2018-01-24T02:49:05.0397398Z Removing application package from image store...
2018-01-24T02:49:05.3268514Z Remove application package succeeded
2018-01-24T02:49:05.3283533Z Creating application...

2.For the next two applications, the deployment fails with the following error :

2018-01-24T02:49:46.7483127Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\StreamReservoirApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:49:48.2340310Z ##[error]An application with name 'fabric:/streamreservoir' already exists, its type is 'streamreservoir' and version is '6.00.7af146b1e9f1084401198b96d7eaf0cacec455f8.0'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.

My assumption is that in case of all the four services :

  1. Deployment should be skipped since the application type, name and version are the same.
  2. If the version is different, the application should be upgraded (not removed and added again).
  3. And finally, only if name and type is different then old one should be removed and new one should be added.
dparkar
  • 1,934
  • 2
  • 22
  • 52
  • 1
    can you try checking 'Override all publish profile upgrade settings'? – LoekD Jan 24 '18 at 07:41
  • Related : https://stackoverflow.com/questions/35711540/how-do-i-deploy-service-fabric-application-from-vsts-release-pipeline – dparkar Jan 24 '18 at 22:23
  • I don't have "override ..." enabled for any of the tasks. Enabling that gives you a whole bunch of options which you can override. – dparkar Jan 24 '18 at 22:26
  • Is old application's ApplicationTypeVersion the same as ApplicationTypeVersion in ApplicationManifest (6.00.9810c873d83e992c104fdcfb125916caa718500a.0)? Can you set system.debug variable to true and queue build, then share the detail log on the OneDrive? (Remove personal information) – starian chen-MSFT Jan 25 '18 at 03:40
  • @LoekD Only after I checked "Override ..." it gave me all the upgrade settings. Using those worked. The other option is to use the settings directly in the publish profiles. So simply checking "Skip upgrade for same type and version" doesn't do anything unless you have upgrade settings either overridden or in the publish profiles. If you'd like to create an answer with this, I can mark is as answered. Thanks ! – dparkar Feb 13 '18 at 06:43

1 Answers1

0
  • Try checking 'Override all publish profile upgrade settings' to configure upgrade settings.

  • Or, as you said:
    The other option is to use the settings directly in the publish profiles. So simply checking "Skip upgrade for same type and version" doesn't do anything unless you have upgrade settings either overridden or in the publish profiles

LoekD
  • 11,402
  • 17
  • 27