avdaccelerator icon indicating copy to clipboard operation
avdaccelerator copied to clipboard

Custom image build deployment failure

Open xelizondo opened this issue 3 years ago • 1 comments

Custom image template deployment failure:

Error at script deployment:

{ "status": "failed", "error": { "code": "DeploymentScriptError", "message": "The provided script failed with the following error:\r\nSystem.InvalidOperationException: Collection was modified; enumeration operation may not execute.\n at System.Collections.Generic.Dictionary2.Enumerator.MoveNext()\n at System.Net.Http.Headers.HttpHeaders.GetEnumeratorCore()+MoveNext()\n at Microsoft.WindowsAzure.Commands.Utilities.Common.GeneralUtilities.ConvertHttpHeadersToWebHeaderCollection(HttpHeaders headers)\n at Microsoft.WindowsAzure.Commands.Utilities.Common.GeneralUtilities.GetLog(HttpRequestMessage request, IList1 matchers)\n at Microsoft.Azure.Commands.Common.AzModule.<>c__DisplayClass24_0.<OnBeforeCall>b__0()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.<>c__DisplayClass62_0.<Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal>b__1()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal(String id, CancellationToken token, Func1 messageData)\n at Microsoft.Azure.Commands.Common.AzModule.OnBeforeCall(String id, CancellationToken cancellationToken, Func1 getEventData, Func4 signal, String processRecordId)\n at Microsoft.Azure.Commands.Common.AzModule.EventListener(String id, CancellationToken cancellationToken, Func1 getEventData, Func4 signal, InvocationInfo invocationInfo, String parameterSetName, String correlationId, String processRecordId, Exception exception)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Module.Signal(String id, CancellationToken token, Func1 getEventData, Func4 signal, InvocationInfo invocationInfo, String parameterSetName, String correlationId, String processRecordId, Exception exception)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal(String id, CancellationToken token, Func1 messageData)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet_Call(HttpRequestMessage request, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet_Call(HttpRequestMessage request, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet(String subscriptionId, String resourceGroupName, String imageTemplateName, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.ProcessRecordAsync()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.ProcessRecordAsync()\r\nat Get-AzImageBuilderTemplate<Process>, /root/.local/share/powershell/Modules/Az.ImageBuilder/0.2.0/exports/ProxyCmdletDefinitions.ps1: line 371\r\nat <ScriptBlock>, /mnt/azscripts/azscriptinput/userscript.ps1: line 24\r\nat <ScriptBlock>, <No file>: line 1\r\nat <ScriptBlock>, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 295. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information." } }

image

I noticed the Build Run state for the image template was still in progress. image

xelizondo avatar Jul 26 '22 13:07 xelizondo

Additional logs:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"DeploymentScriptError","message":"The provided script failed with the following error:\r\nSystem.InvalidOperationException: Collection was modified; enumeration operation may not execute.\n at System.Collections.Generic.Dictionary2.Enumerator.MoveNext()\n at System.Net.Http.Headers.HttpHeaders.GetEnumeratorCore()+MoveNext()\n at Microsoft.WindowsAzure.Commands.Utilities.Common.GeneralUtilities.ConvertHttpHeadersToWebHeaderCollection(HttpHeaders headers)\n at Microsoft.WindowsAzure.Commands.Utilities.Common.GeneralUtilities.GetLog(HttpRequestMessage request, IList1 matchers)\n at Microsoft.Azure.Commands.Common.AzModule.<>c__DisplayClass24_0.<OnBeforeCall>b__0()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.<>c__DisplayClass62_0.<Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal>b__1()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal(String id, CancellationToken token, Func1 messageData)\n at Microsoft.Azure.Commands.Common.AzModule.OnBeforeCall(String id, CancellationToken cancellationToken, Func1 getEventData, Func4 signal, String processRecordId)\n at Microsoft.Azure.Commands.Common.AzModule.EventListener(String id, CancellationToken cancellationToken, Func1 getEventData, Func4 signal, InvocationInfo invocationInfo, String parameterSetName, String correlationId, String processRecordId, Exception exception)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Module.Signal(String id, CancellationToken token, Func1 getEventData, Func4 signal, InvocationInfo invocationInfo, String parameterSetName, String correlationId, String processRecordId, Exception exception)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IEventListener.Signal(String id, CancellationToken token, Func1 messageData)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet_Call(HttpRequestMessage request, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet_Call(HttpRequestMessage request, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.ImageBuilder.VirtualMachineImageTemplatesGet(String subscriptionId, String resourceGroupName, String imageTemplateName, Func3 onOk, Func3 onDefault, IEventListener eventListener, ISendAsync sender)\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.ProcessRecordAsync()\n at Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Cmdlets.GetAzImageBuilderTemplate_Get.ProcessRecordAsync()\r\nat Get-AzImageBuilderTemplate<Process>, /root/.local/share/powershell/Modules/Az.ImageBuilder/0.2.0/exports/ProxyCmdletDefinitions.ps1: line 371\r\nat <ScriptBlock>, /mnt/azscripts/azscriptinput/userscript.ps1: line 24\r\nat <ScriptBlock>, <No file>: line 1\r\nat <ScriptBlock>, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 295. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information."}]}

danycontre avatar Jul 26 '22 15:07 danycontre

This issue has been resolved.

swathibhat1 avatar Dec 06 '22 02:12 swathibhat1