添加 AzureRmServiceFabricClusterCertificate 以错误结束 'Certificates cannot be added and removed at the same time.'

Add-AzureRmServiceFabricClusterCertificate ends with error 'Certificates cannot be added and removed at the same time.'

我尝试滚动更新 Service Fabric 集群的集群证书。所以我尝试用这个命令注入一个新的自签名二级证书:

Add-AzureRmServiceFabricClusterCertificate -ResourceGroupName $configuration.ResourceGroupName -Name $clusterName -SecretIdentifier $certificateVaultUrl_Secondary

错误详情

"error": {
   "code": "AddAndRemoveCertificateNotAllowed",
   "message": "Certificates cannot be added and removed at the same time.",
   "details": []
}

环境

使用ARM部署时,出现同样的错误信息。

目前(2017 年 11 月)无法修改集群证书指纹。工作流程:

  1. 使用门户删除现有的辅助指纹(触发集群升级)
  2. 使用 ARM 部署指定新辅助证书的位置和指纹(触发集群升级)
  3. 使用门户将辅助证书与主证书交换(触发集群升级)
  4. 使用门户删除辅助指纹 -> 这将删除旧的主证书(触发集群升级)

这是我们发现的唯一向集群提供新证书的工作流程。