I am trying to install Azure Diagnostics on a deployed cloud service using the Azure Powershell cmdlets and the Set-AzureServiceDiagnosticsExtension command:
Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $diagnosticsConfiguration.FullName -ServiceName $serviceName -Slot Production -Role "MyService.Web"-Verbose
Having done this, I get the following error:
Exception: Microsoft.WindowsAzure.CloudException: BadRequest: The extension ID
MyService.Web-PaaSDiagnostics-Production-Ext-0 is invalid.
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task
task)
at Microsoft.WindowsAzure.HostedServiceOperationsExtensions.AddExtension(IHo
stedServiceOperations operations, String serviceName,
HostedServiceAddExtensionParameters parameters)
at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionMan
ager.AddExtension(HostedServiceAddExtensionParameters extensionInput)
at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionMan
ager.InstallExtension(ExtensionConfigurationInput context, String slot,
ExtensionConfiguration extConfig)
at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServ
iceDiagnosticsExtensionCommand.ExecuteCommand()
at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServ
iceDiagnosticsExtensionCommand.OnProcessRecord()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CloudBaseCmdlet`1.Proces
sRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
tion
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
n,UpdateDiagnosticsBuildStep.ps1
It works when I do not use the "-Role" parameter, but then I need to call Remove-AzureServiceDiagnosticsExtension for each role before calling the Set command, which adds 2-3 minutes to the role during script execution.
The Role parameter matches the name of my role in the Azure Cloud Service. Am I doing something wrong?
source
share