我正在将Azure云服务部署部署到PowerShell中具有New-AzureDeployment的空Staging插槽,以及通过New-AzureServiceDiagnosticsExtensionConfig创建的诊断的扩展配置。
当我将其交换到制作并致电时:
Get-AzureServiceDiagnosticsExtension -ServiceName "my-service-name-here" -Slot Production
" Id"物业回归为" MyRole-PaaSDiagnostics-Staging-Ext-0"。请注意,它仍然会说" Staging"。
现在,如果我尝试对登台进行新部署,我会收到一条错误消息:
New-AzureDeployment : ConflictError: The extension ID MyRole-PaaSDiagnostics-Staging-Ext-0 is already in use for this deployment.
这似乎已经破了,因为当时没有任何部署到舞台上。我可以将新的云服务部署到" Staging"如果我首先从"生产"删除诊断扩展名,则使用诊断扩展名。使用Remove-AzureServiceDiagnosticsExtension。
这是一个错误或任何关于我可能做错的想法?我没有看到一个允许我为扩展名指定备用ID的选项。
更新
这对我来说绝对是一个错误。如果我这样做:
Get-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Production
我使用登台ID取回扩展程序。如果我执行以下操作:
Remove-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Production
我回来了(注意:扩展程序最初已部署到暂存中,然后我将其交换到生产中):
WARNING: No existing Microsoft.Azure.Diagnostics.PaaSDiagnostics extensions enabled on given roles.
如果我执行以下操作:
Remove-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Staging
我回来了:
Remove-AzureServiceDiagnosticsExtension : Deployment not found in service: my-service and slot: Staging.
因此,实际上似乎没有首先在插槽中部署新内容的情况下删除诊断扩展的方法。
答案 0 :(得分:0)
原来这是github azure-powershell项目中报告的错误:https://github.com/Azure/azure-powershell/issues/193
看起来有人已经提交了一个潜在的解决方案。