【问题标题】:Service Fabric VSTS Task weird behaviorService Fabric VSTS 任务奇怪的行为
【发布时间】:2018-07-03 00:14:18
【问题描述】:

我使用 VSTS 为 Azure Service Fabric 中的 4 个服务中的每一个设置了 CD 任务。以下是所有 4 个任务的配置(除了它们指向不同服务的不同文件夹):

问题:

1.对于前两个应用程序,即使我检查了“跳过相同类型和版本的升级”,我注意到任务仍然删除应用程序,取消注册类型并为相同的应用程序类型和版本重做.以下是示例日志:

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.对于接下来的两个应用程序,部署失败并出现以下错误:

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.

我的假设是在所有四种服务的情况下:

  1. 应跳过部署,因为应用程序类型、名称和版本相同。
  2. 如果版本不同,应升级应用程序(不要删除并重新添加)。
  3. 最后,只有当名称和类型不同时,才应删除旧的并添加新的。

【问题讨论】:

  • 您可以尝试检查“覆盖所有发布配置文件升级设置”吗?
  • 我没有为任何任务启用“覆盖...”。启用它会为您提供一大堆可以覆盖的选项。
  • 旧应用的 ApplicationTypeVersion 是否与 ApplicationManifest (6.00.9810c873d83e992c104fdcfb125916caa718500a.0) 中的 ApplicationTypeVersion 相同?您可以将 system.debug 变量设置为 true 并排队构建,然后在 OneDrive 上共享详细日志吗? (删除个人信息)
  • @LoekD 只有在我检查了“覆盖...”之后,它才给了我所有的升级设置。使用那些工作。另一种选择是直接在发布配置文件中使用设置。因此,除非您已覆盖升级设置或在发布配置文件中,否则只需检查“跳过相同类型和版本的升级”不会做任何事情。如果您想以此创建答案,我可以将其标记为已回答。谢谢!

标签: azure-devops azure-service-fabric azure-pipelines-release-pipeline


【解决方案1】:
  • 尝试选中“覆盖所有发布配置文件升级设置”以配置升级设置。

  • 或者,正如你所说:
    另一种选择是直接在发布配置文件中使用设置。因此,除非您已覆盖升级设置或在发布配置文件中,否则只需检查“跳过相同类型和版本的升级”不会做任何事情

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-04
    • 2013-01-14
    • 2019-02-11
    • 2017-01-21
    • 2016-11-16
    • 2018-04-01
    • 2017-01-20
    • 1970-01-01
    相关资源
    最近更新 更多