Azure-quickstart-templates: azure RM template deployment: all operations successfull, but overall fail message

Created on 24 Feb 2016  路  20Comments  路  Source: Azure/azure-quickstart-templates

We are using azure RM for starting a VM with vm extensions. Everything seems fine, all Operations are successfull, but the very last event reports fail:

The failing event is a

  • operationName : Microsoft.Resources/deployments/write
  • resourceUri: /subscriptions/947dafa0-8a1d-xxxx-909b-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template

What is actually the meaning of write of a /deployments/Microsoft.Template?
What can be wrong with it?

log

The last event from azure group log show $group --json

[
  {
    "claims": {
      "aud": "https://management.core.windows.net/",
      "name": "aszegedi",
      "ver": "1.0"
      ...
    },
    "properties": {},
    "authorization": {
      "action": "Microsoft.Resources/deployments/write",
      "scope": "/subscriptions/947dafa0-8a1d-xxxx-909b-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template"
    },
    "eventChannels": "Operation",
     ....
    "eventName": {
      "value": "EndRequest",
      "localizedValue": "End request"
    },
    "eventSource": {
      "value": "Administrative",
      "localizedValue": "Administrative"
    },
    "level": "Error",
    "resourceGroupName": "cbstoreancsa",
    "resourceProviderName": {
      "value": "Microsoft.Resources",
      "localizedValue": "Microsoft Resources"
    },
    "resourceUri": "/subscriptions/947dafa0-8a1d-xxxx-909b-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template",
    "operationId": "5ca7fb4b-74f5-4138-8085-7faa99b004ad",
    "operationName": {
      "value": "Microsoft.Resources/deployments/write",
      "localizedValue": "Microsoft.Resources/deployments/write"
    },
    "status": {
      "value": "Failed",
      "localizedValue": "Failed"
    },
    "subStatus": {},
    "eventTimestamp": "2016-02-23T12:41:53.7268991Z",
    "submissionTimestamp": "2016-02-23T12:42:10.230373Z",
    "subscriptionId": "947dafa0-8a1d-xxxx-909b-c71a0fa03ea6"
  },
question

Most helpful comment

@lalyos This is a known limitation in the platform where a dynamic public ipaddress doesn't resolve itself until the VM is up and running. There are two options to workaround

1) Create the Public IP Address in static mode. That will ensure that Public IP address is immediately allocated. However, note that you might incur additional charges.
2) Change the dependency from Public IP address to the Virtual Machine that the IP address is attached to. This will ensure that the public ip address is always available.

All 20 comments

Adding @ravbhatnagar for the write questions

@lalyos The best way to check why the extension failed is to go to resources.azure.com and browse to your VM and check its instance view

@singhkay The extensions didn't failt at all. Thats the strange thing: all operations succeeded,
except the last one which is a write on resource: /deployments/Microsoft.Template.

  1. I dont understand at all what the write on Template means?
  2. how could it fail / why did it fail

@lalyos you need to dump the entire output of:

azure group log show testsshvm --json | jq '.[] | select(.status.value == "Failed")'

There must be some text associated with the error.... if there isn't, that is in itself a bug.

@squillace I just removed some "it-might-be-sensitive" fields, but no i didnet found any more details about the cause of the fail.

So From 76 events this is the only failing

["Failed","Microsoft.Resources/deployments/write","/subscriptions/947dafa0-8a1d-4ac9-xxx-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Network/networkInterfaces/write","//Microsoft.Network/networkInterfaces/cbdeployerNic"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Network/virtualNetworks/write","//Microsoft.Network/virtualNetworks/cbdeployerVnet"]
["Succeeded","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Succeeded","Microsoft.Network/publicIPAddresses/write","//Microsoft.Network/publicIPAddresses/cbdeployerPublicIp"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Started","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/installcustomscript"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Started","Microsoft.Compute/virtualMachines/extensions/write","//Microsoft.Compute/virtualMachines/cbdeployerVM/extensions/DockerExtension"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Started","Microsoft.Compute/virtualMachines/write","//Microsoft.Compute/virtualMachines/cbdeployerVM"]
["Succeeded","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Succeeded","Microsoft.Network/networkInterfaces/write","//Microsoft.Network/networkInterfaces/cbdeployerNic"]
["Started","Microsoft.Network/networkInterfaces/write","//Microsoft.Network/networkInterfaces/cbdeployerNic"]
["Succeeded","Microsoft.Network/virtualNetworks/write","//Microsoft.Network/virtualNetworks/cbdeployerVnet"]
["Succeeded","Microsoft.Network/publicIPAddresses/write","//Microsoft.Network/publicIPAddresses/cbdeployerPublicIp"]
["Succeeded","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Accepted","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Started","Microsoft.Network/virtualNetworks/write","//Microsoft.Network/virtualNetworks/cbdeployerVnet"]
["Started","Microsoft.Network/publicIPAddresses/write","//Microsoft.Network/publicIPAddresses/cbdeployerPublicIp"]
["Started","Microsoft.Storage/storageAccounts/write","//Microsoft.Storage/storageAccounts/cbdstorageimehzrqudenlk"]
["Succeeded","Microsoft.Resources/deployments/write","/subscriptions/947dafa0-8a1d-4ac9-909b-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template"]
["Started","Microsoft.Resources/deployments/write","/subscriptions/947dafa0-8a1d-4ac9-909b-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template"]

So here is the full failing event json:

 {
    "claims": {
      "aud": "https://management.core.windows.net/",
      "iss": "https://sts.windows.net/8a73xxxx-yyyy-xxxx-yyyy-1ae1ed8d8504/",
      "iat": "1456229564",
      "nbf": "1456229564",
      "exp": "1456233464",
      "http://schemas.microsoft.com/claims/authnclassreference": "1",
      "http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd",
      "appid": "c44bxxxx-yyyy-xxxx-yyyy-974e53cbdf3c",
      "appidacr": "2",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "Szegedi",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "Annamaria",
      "groups": "51e4xxxx-yyyy-xxxx-yyyy-1bbac72ac184",
      "ipaddr": "104.211.58.72",
      "name": "aszegedi",
      "http://schemas.microsoft.com/identity/claims/objectidentifier": "41f8xxxx-yyyy-xxxx-yyyy-54d52fd880f5",
      "puid": "10033FFF946EE3D9",
      "http://schemas.microsoft.com/identity/claims/scope": "user_impersonation",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "kW-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "http://schemas.microsoft.com/identity/claims/tenantid": "8a73xxxx-yyyy-xxxx-yyyy-1ae1ed8d8504",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "[email protected]",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn": "[email protected]",
      "ver": "1.0",
      "wids": "fe93xxxx-yyyy-xxxx-yyyy-98c3a49a38b1"
    },
    "properties": {},
    "authorization": {
      "action": "Microsoft.Resources/deployments/write",
      "scope": "/subscriptions/947dxxxx-yyyy-xxxx-yyyy-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template"
    },
    "eventChannels": "Operation",
    "caller": "[email protected]",
    "eventDataId": "da5cxxxx-yyyy-xxxx-yyyy-b6aac8daf0b1",
    "correlationId": "5fa0xxxx-yyyy-xxxx-yyyy-bf50fc55eaeb",
    "eventName": {
      "value": "EndRequest",
      "localizedValue": "End request"
    },
    "eventSource": {
      "value": "Administrative",
      "localizedValue": "Administrative"
    },
    "level": "Error",
    "resourceGroupName": "cbstoreancsa",
    "resourceProviderName": {
      "value": "Microsoft.Resources",
      "localizedValue": "Microsoft Resources"
    },
    "resourceUri": "/subscriptions/947dxxxx-yyyy-xxxx-yyyy-c71a0fa03ea6/resourcegroups/cbstoreancsa/deployments/Microsoft.Template",
    "operationId": "5ca7xxxx-yyyy-xxxx-yyyy-7faa99b004ad",
    "operationName": {
      "value": "Microsoft.Resources/deployments/write",
      "localizedValue": "Microsoft.Resources/deployments/write"
    },
    "status": {
      "value": "Failed",
      "localizedValue": "Failed"
    },
    "subStatus": {},
    "eventTimestamp": "2016-02-23T12:41:53.7268991Z",
    "submissionTimestamp": "2016-02-23T12:42:10.230373Z",
    "subscriptionId": "947dxxxx-yyyy-xxxx-yyyy-c71a0fa03ea6"
  },

Here is a screenshot showint all-but-1 successfull operations with no further failure description:

screen shot 2016-02-29 at 7 05 32 pm

@ravbhatnagar Any ideas on what failed?

related to this - https://github.com/Azure/azure-powershell/issues/1801. This has been fixed in the March release of PS.

@lalyos did you use PS to deploy this template?

@vivsriaus - Can you please verify if we have the same issue in CLI as well?

@squillace No I wasnt using poweshell, I was using the xplat cli, and also tested the same template on azure portal, with the same result.

Btw if you want to reproduce, here is my template: deploy on azure

It may be an underlying issue to #1801 that also affected xplat; but having no error string is wrong. We have someone looking at it internally as we speak.

Oh, and what version of the xplat were you using, @lalyos?

This is not a client side issue - from the screenshot, it looks like ARM is throwing an error without any details. We'll have someone from ARM look into it.

Hi @vivsriaus do ypu have any update on this one? Its still has the same behaviour.

@lalyos This is a known limitation in the platform where a dynamic public ipaddress doesn't resolve itself until the VM is up and running. There are two options to workaround

1) Create the Public IP Address in static mode. That will ensure that Public IP address is immediately allocated. However, note that you might incur additional charges.
2) Change the dependency from Public IP address to the Virtual Machine that the IP address is attached to. This will ensure that the public ip address is always available.

@mahthi Can you explain your last two answers?
I have almost the same issue but i can't deploy it with your solutions.

this here is my issue ... [https://github.com/Azure/azure-quickstart-templates/issues/2180]

See also a workaround here: https://github.com/Azure/azure-quickstart-templates/issues/583 although I prefer (and am using) the solution of making the publicIpAllocationMethod be Static.

Hi @mahthi

Change the dependency from Public IP address to the Virtual Machine that the IP address is attached to. This will ensure that the public ip address is always available

Can you please confirm on this? In a normal exported VM ARM template, VM has the dependency on the network interface which has the dependency on the public IP address. It doesn't output the IP address right way from ARM. It takes awhile to get the IP address. If I miss out something, please share me an example ARM template. Thanks.

Example The example below doesn't work on the first run.


 "name": "[parameters('virtualMachineName')]",
            "type": "Microsoft.Compute/virtualMachines",
            "apiVersion": "2018-04-01",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]",
                "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]",
                "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]"
            ],
Was this page helpful?
0 / 5 - 0 ratings