aks-engine icon indicating copy to clipboard operation
aks-engine copied to clipboard

vmssCSE is consistently timing out

Open PacoGuy opened this issue 7 years ago • 2 comments

Is this a request for help?: Yes

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

What version of aks-engine?: 0.31.3 & 0.32.0

Kubernetes version: 1.13.4 & 1.10.13

What happened: Deployments fail due to "Provisioning of VM extension 'vmssCSE' has timed out. Extension installation may be taking too long, or extension status could not be obtained."

The time until failure is currently ~1.5 hours on a 1 master / 1-3 node VMSS cluster. { "id": "/subscriptions/****/resourceGroups/****/providers/Microsoft.Resources/deployments/****/operations/****", "operationId": "CDFD569B7A748976", "properties": { "provisioningOperation": "Create", "provisioningState": "Failed", "timestamp": "2019-03-14T17:41:28.1234752Z", "duration": "PT1H31M37.5199496S", "trackingId": "****", "serviceRequestId": "****", "statusCode": "Conflict", "statusMessage": { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "VMExtensionProvisioningTimeout", "message": "Provisioning of VM extension 'vmssCSE' has timed out. Extension installation may be taking too long, or extension status could not be obtained." } ] } }, "targetResource": { "id": "/subscriptions/****/resourceGroups/****/providers/Microsoft.Compute/virtualMachineScaleSets/****", "resourceType": "Microsoft.Compute/virtualMachineScaleSets", "resourceName": "****" } }}

We are using a single VMSS agent pool, with cluster-autoscaler enabled and configured.

What you expected to happen: Cluster to deploy in ~15 minutes without failure.

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

  "apiVersion": "vlabs",
  "properties": {
    "orchestratorProfile": {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.10.13",
      "kubernetesConfig": {
        "networkPolicy": "azure",
        "maxPods": 20,
        "apiServerConfig": {
          "--enable-admission-plugins":"NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota",
          "--requestheader-allowed-names":"aggregator",
          "--authorization-mode": "Node,RBAC"
        },
        "controllerManagerConfig": {
          "--horizontal-pod-autoscaler-use-rest-clients":"true",
          "--horizontal-pod-autoscaler-sync-period":"1s"
        },
        "useInstanceMetadata": true,
        "privateCluster": {
          "enabled": true
      	},
        "addons": [
          {
            "name": "cluster-autoscaler",
            "enabled": true,
            "config": {
              "min-nodes": "3",
              "max-nodes": "5",
              "scan-interval": "60s"
            }
          }
        ]
       }
    },
    "masterProfile": {
      "count": 1,
      "dnsPrefix": "****",
      "vmSize": "Standard_D4_v3",
      "vnetSubnetId": "/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****",
      "firstConsecutiveStaticIP": "****.250",
      "OSDiskSizeGB": 128,
      "vnetCidr": "****.0/22"
    },
    "agentPoolProfiles": [
      {
        "name": "agentpool1",
        "count": 3,
        "imageReference": {
          "name": "k8sNodeImage190312",
          "resourceGroup": "****"
        },
        "vmSize": "Standard_D8s_v3",
        "vnetSubnetId": "/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****",
        "storageProfile" : "ManagedDisks",
        "availabilityProfile": "VirtualMachineScaleSets",
        "customNodeLabels": {
          "role_worker": "all"
        },
        "OSDiskSizeGB": 600
      }
    ],
    "linuxProfile": {
      "adminUsername": "azuser",
      "ssh": {
        "publicKeys": [
          {
            "keyData": "****"
          }
        ]
      }
    },
    "servicePrincipalProfile": {
      "clientId": "****",
      "secret": "****"
    }
  }
}

The deployment is run with the following command after a standard aks-engine generate k8s.json:

az group deployment create --name ${cluster_name} --resource-group ${resource_group_name} --template-file ./$(find _output -name 'azuredeploy.json') --parameters @./$(find _output -name 'azuredeploy.parameters.json')

Anything else we need to know: Hopefully this is not just an error in our k8s.json but the same deployer docker image we build worked last week and as recently as March 12 (built and run via Jenkins for reproducibility).

Due to our network/security requirements we are forced to be in a custom vnet and our k8s.json config reflects that with the vnetSubnetId configuration.

The custom image that we create is created from a standard aks-engine deployment VM, with the fs.inotify.max_user_watches set to 524288 and the search domain explicitly set in /etc/resolvconf/resolv.conf.d/base due to networking/dns issues.

The deployment works properly for everything except for the VMSS showing a Status "Conflict".

Quite often the nodes are in a bad dpkg/apt state when we see long deployment times for the agent pool nodes.

This is not the first time that CSEs have acted oddly but this is the hardest that they have failed (which somehow always seems to correspond to my team needing to do a cluster refresh :cry: )

PacoGuy avatar Mar 14 '19 18:03 PacoGuy

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

welcome[bot] avatar Mar 14 '19 18:03 welcome[bot]

I was able to test the latest release with our config today and everything went great. Thank you!

PacoGuy avatar Mar 18 '19 23:03 PacoGuy