Azure / acs-engine

WE HAVE MOVED: Please join us at Azure/aks-engine!
https://github.com/Azure/aks-engine
MIT License
1.03k stars 560 forks source link

The template deployment is not valid according to the validation procedure #2161

Closed bailantaotao closed 6 years ago

bailantaotao commented 6 years ago

Is this a request for help?:

yes


Is this an ISSUE or FEATURE REQUEST? (choose one):

issue


What version of acs-engine?:

Version: canary GitCommit: e251320a GitTreeState: clean


Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm)

Kubernates

What happened:

The template deployment 'dev-acs' is not valid according to the validation procedure. The tracking id is 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage details.

What you expected to happen:

It should print the fully error message. How do i to use tracking id?

How to reproduce it (as minimally and precisely as possible):

$ acs-engine generate template.json
$ az group deployment create --name dev-acs --resource-group rg-dev-acs --template-file _output/dev-acs/azuredeploy.json --parameters _output/dev-acs/azuredeploy.parameters.json

Anything else we need to know:

template.json

{
  "apiVersion": "vlabs",
  "properties": {
    "orchestratorProfile": {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.9",
      "kubernetesConfig": {
        "enableRbac": true,
        "networkPolicy": "calico",
        "clusterSubnet": "172.16.0.0/20"
      }
    },
    "masterProfile": {
      "dnsPrefix": "dev-acs",
      "count": 1,
      "vmSize": "Standard_DS2_v2",
      "vnetSubnetId": "/subscriptions/xxxxxxx/resourceGroups/vpc-dev-acs/providers/Microsoft.Network/virtualNetworks/vnet-dev-acs/subnets/subnet-dev-acs",
      "vnetCidr": "10.1.48.0/20",
      "firstConsecutiveStaticIP": "10.1.63.254",
      "OSDiskSizeGB": 512,
      "storageProfile": "ManagedDisks"
    },
    "agentPoolProfiles": [
      {
        "name": "memory",
        "count": 4,
        "vmSize": "Standard_DS2_v2",
        "availabilityProfile": "AvailabilitySet",
        "vnetSubnetId": "/subscriptions/xxxxxxx/resourceGroups/vpc-dev-acs/providers/Microsoft.Network/virtualNetworks/vnet-dev-acs/subnets/subnet-dev-acs",
        "OSDiskSizeGB": 512,
        "storageProfile": "ManagedDisks"
      },
      {
        "name": "memoryplus",
        "count": 1,
        "vmSize": "Standard_D8s_v3",
        "availabilityProfile": "AvailabilitySet",
        "vnetSubnetId": "/subscriptions/xxxxxxx/resourceGroups/vpc-dev-acs/providers/Microsoft.Network/virtualNetworks/vnet-dev-acs/subnets/subnet-dev-acs",
        "OSDiskSizeGB": 512,
        "storageProfile": "ManagedDisks"
      },
      {
        "name": "compute",
        "count": 1,
        "vmSize": "Standard_F4s_v2",
        "availabilityProfile": "AvailabilitySet",
        "vnetSubnetId": "/subscriptions/xxxxxxx/resourceGroups/vpc-dev-acs/providers/Microsoft.Network/virtualNetworks/vnet-dev-acs/subnets/subnet-dev-acs",
        "OSDiskSizeGB": 512,
        "storageProfile": "ManagedDisks"
      },
      {
        "name": "storage",
        "count": 1,
        "vmSize": "Standard_L4s",
        "availabilityProfile": "AvailabilitySet",
        "vnetSubnetId": "/subscriptions/xxxxxxx/resourceGroups/vpc-dev-acs/providers/Microsoft.Network/virtualNetworks/vnet-dev-acs/subnets/subnet-dev-acs",
        "OSDiskSizeGB": 512,
        "storageProfile": "ManagedDisks",
        "diskSizesGB": [1023]
      }
    ],
    "linuxProfile": {
      "adminUsername": "amis",
      "ssh": {
        "publicKeys": [
          {
            "keyData": "xxxxxxxxxxx"
          }
        ]
      }
    },
    "servicePrincipalProfile": {
      "clientId": "xxxxxxxxxxx",
      "secret": "xxxxxxxxxxx"
    }
  }
}
andscho-msft commented 6 years ago

I ran into this also yesterday, and I was able to find my actual error by using the powershell commandlets.

Get-AzureRMLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -DetailedOutput
bailantaotao commented 6 years ago

Thanks for @andscho-msft

I cannot to use the command Get-AzureRMLog on macOS environment.

But i can get the information from Azure Cloud Shell :)

dazinator commented 6 years ago

I just hit this error attempting to follow the quickstart guide for acs and swarm: https://docs.microsoft.com/en-gb/azure/container-service/dcos-swarm/container-service-swarm-mode-walkthrough

When doing az acs create it looks like it uses a default --agent-vm-size of Standard_D2_v2 which isn't available for my region uksouth.

statusMessage : {"error":{"code":"InvalidTemplateDeployment","message":"The template deployment 'azurecli1530746282.225976240739' is not valid according to the validation procedure. The tracking id is '633ea5d1-83ba-4422-80eb-5c409cec1144'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage details.","details":[{"code":"BadRequest","message":"Provisioning of resource(s) for container service dennisswarmcluster in resource group dockerswarm failed. Message: {\n \"code\": \"BadRequest\",\n \"message\": \"The VM size of MasterProfile,AgentPoolProfile:agentpool0 is not allowed in your subscription in location 'uksouth'. The available VM sizes are Standard_F16s_v2,Sta ndard_F2s_v2,Standard_F32s_v2,Standard_F4s_v2,Standard_F64s_v2,Standard_F72s_v2,Standard_F8s_v2,Standard_G1,Standard_G2,Standard_G3,Standard_G4,Stan dard_G5,Standard_GS1,Standard_GS2,Standard_GS3,Standard_GS4,Standard_GS4-4,Standard_GS4-8,Standard_GS5,Standard_GS5-16,Standard_GS5-8,Standard_H16,S tandard_H16m,Standard_H16mr,Standard_H16r,Standard_H8,Standard_H8m,Standard_L16s,Standard_L32s,Standard_L4s,Standard_L8s,Standard_M128-32ms,Standard _M128-64ms,Standard_M128ms,Standard_M128s,Standard_M64-16ms,Standard_M64-32ms,Standard_M64ms,Standard_M64s,Standard_NC12,Standard_NC12sv3,Standard NC24,Standard_NC24r,Standard_NC24rs_v3,Standard_NC24s_v3,Standard_NC6,Standard_NC6s_v3,Standard_NV12,Standard_NV24,Standard_NV6\"\n }. Details: "}]}}

The error actually output isn't helpful, i had to get the above via the cloud shell. Now I am left with the problem of how to figure out what vm size I need to get started quickly. I have no idea which one of the available uksouth ones is closest to that non available one.

It's a shame this quickstart has actually quickly turned into a long and painful experience and I am still not up and running.

iamgini commented 5 years ago

I ran into this also yesterday, and I was able to find my actual error by using the powershell commandlets.

Get-AzureRMLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -DetailedOutput

Wonderful :)

ahelwer commented 4 years ago

With the new Azure PowerShell commandlets, you're actually looking for:

Get-AzLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -DetailedOutput
elpablete commented 4 years ago

With the new Azure PowerShell commandlets, you're actually looking for:

Get-AzLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -DetailedOutput

Cloud shell returns empty result using this command with my trakcing Id.

ahelwer commented 4 years ago

@elpablete try:

$result = Get-AzLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -DetailedOutput

Then examine $result.

eisber commented 4 years ago

Azure CLI: az monitor activity-log list --correlation-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

rdtechie commented 4 years ago

((Get-AzLog -CorrelationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).Properties.Content.statusMessage | ConvertFrom-Json -AsHashtable).error.details.message

ghost commented 4 years ago

Azure CLI: az monitor activity-log list --correlation-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

One thing here, just make sure you supply the subscription ot set the default subscription, the command won't error with not found it will just return an empty list