[英]Azure diagnostics extension ConflictError for empty Staging slot (Azure SDK 2.6)
I am deploying an Azure cloud service deployment to an empty Staging slot with New-AzureDeployment in PowerShell along with an extension configuration for diagnostics created via New-AzureServiceDiagnosticsExtensionConfig. 我正在使用PowerShell中的New-AzureDeployment以及用于通过New-AzureServiceDiagnosticsExtensionConfig创建的诊断的扩展配置,将Azure云服务部署部署到一个空的暂存插槽。
When I swap that to production and call: 当我将其交换给生产并致电时:
Get-AzureServiceDiagnosticsExtension -ServiceName "my-service-name-here" -Slot Production
The "Id" property comes back as "MyRole-PaaSDiagnostics-Staging-Ext-0". “ Id”属性作为“ MyRole-PaaSDiagnostics-Staging-Ext-0”返回。 Note that it still says "Staging". 请注意,它仍然显示“登台”。
Now, if I try to do a new deployment to staging I get an error that says: 现在,如果我尝试进行新的部署以进行登台,则会收到一条错误消息:
New-AzureDeployment : ConflictError: The extension ID MyRole-PaaSDiagnostics-Staging-Ext-0 is already in use for this deployment.
This seems broken since there is nothing deployed to staging at the time. 这似乎是无效的,因为当时没有部署任何暂存。 The only way I can deploy a new cloud service to "Staging" with a diagnostics extension is if I first delete the diagnostics extension from "Production" with Remove-AzureServiceDiagnosticsExtension. 我可以使用诊断扩展名将新的云服务部署到“登台”的唯一方法是,如果我首先使用Remove-AzureServiceDiagnosticsExtension从“生产”中删除诊断扩展名。
Is this a bug or any thoughts on what I might be doing wrong? 这是错误还是对我可能做错的任何想法? I didn't see an option that would let me specify an alternate Id for the extension. 我没有看到可以让我为扩展名指定备用ID的选项。
Update 更新
This definitely feels like a bug to me. 对我来说,这绝对像是个虫子。 If I do: 如果我做:
Get-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Production
I get back the extension with the staging Id. 我返回带有阶段ID的扩展名。 If I do the following: 如果我执行以下操作:
Remove-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Production
I get back (NOTE: The extension was deployed into staging originally and then I swapped it into production): 我回来了(注意:该扩展最初部署到暂存阶段,然后将其交换到生产环境中):
WARNING: No existing Microsoft.Azure.Diagnostics.PaaSDiagnostics extensions enabled on given roles.
If I do the following: 如果我执行以下操作:
Remove-AzureServiceDiagnosticsExtension -ServiceName "my-service" -Slot Staging
I get back: 我回来了:
Remove-AzureServiceDiagnosticsExtension : Deployment not found in service: my-service and slot: Staging.
So, it actually appears that I have zero means of removing the diagnostics extension without first deploying something new into the slot. 因此,实际上看来,在没有先将新功能部署到插槽中的情况下,我有零种方法来删除诊断扩展。
Turns out this is a reported bug on the github azure-powershell project: https://github.com/Azure/azure-powershell/issues/193 原来这是github azure-powershell项目上的一个已报告的错误: https : //github.com/Azure/azure-powershell/issues/193
and looks like someone already submitted a potential fix too. 并且看起来有人也已经提交了潜在的修复程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.