首页 文章

空诊断插槽的Azure诊断扩展插件ConflictError(Azure SDK 2.6)

提问于
浏览
1

我正在使用PowerShell中的New-AzureDeployment将Azure Cloud 服务部署部署到空的Staging插槽,以及通过New-AzureServiceDiagnosticsExtensionConfig创建的诊断的扩展配置 .

当我将其交换到 生产环境 并致电时:

Get-AzureServiceDiagnosticsExtension -ServiceName "my-service-name-here" -Slot Production

“Id”属性返回“MyRole-PaaSDiagnostics-Staging-Ext-0” . 请注意,它仍然显示“暂存” .

现在,如果我尝试对登台进行新部署,我会收到一条错误消息:

New-AzureDeployment : ConflictError: The extension ID MyRole-PaaSDiagnostics-Staging-Ext-0 is already in use for this deployment.

这似乎已经破了,因为当时没有任何部署到舞台上 . 如果我首先使用Remove-AzureServiceDiagnosticsExtension从“Production”中删除诊断扩展,那么我可以使用诊断扩展将新 Cloud 服务部署到“Staging”的唯一方法 .

这是一个错误或任何关于我可能做错的想法?我没有看到允许我为扩展指定备用ID的选项 .

Update

这对我来说绝对是个错误 . 如果我做:

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.

因此,实际上我似乎没有删除诊断扩展的方法,而没有先在插槽中部署新内容 .

1 回答

相关问题