powershell - 空暂存槽的 Azure 诊断扩展冲突错误 (Azure SDK 2.6)

标签 powershell azure azure-diagnostics

我正在使用 PowerShell 中的 New-AzureDeployment 将 Azure 云服务部署以及通过 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.

这似乎被破坏了,因为当时没有部署任何东西来登台。我可以使用诊断扩展将新的云服务部署到“暂存”的唯一方法是首先使用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.

因此,实际上,我没有办法在不首先将新内容部署到插槽中的情况下删除诊断扩展。

最佳答案

事实证明,这是 github azure-powershell 项目上报告的错误:https://github.com/Azure/azure-powershell/issues/193

看起来有人也已经提交了潜在的修复程序。

关于powershell - 空暂存槽的 Azure 诊断扩展冲突错误 (Azure SDK 2.6),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30230617/

相关文章:

json - 如何将Powershell中的对象拆分为正确的JSON格式

powershell - 在远程计算机上运行Powershell脚本

windows - 从 Windows 路径变量中删除行

从 iFrame 进行 Azure B2C 单点登录

azure - Azure 中的 301 重定向

Azure DiagnosticsMonitorTraceListener 不工作

windows - 从 powershell 中删除 Microsoft.Powershell.Utility 模块

azure - 是否可以回收 Azure Web 应用程序的应用程序池

azure - KQL 分组依据与拖放分组功能的结果相同

azure - 如何在 Azure 项目中使用跟踪诊断