VM has reported a failure when processing extension 'cse0'
Is this a request for help?:
Is this an ISSUE or FEATURE REQUEST? (choose one): ISSUE
What version of acs-engine?: Version: canary GitCommit: 8db990ba GitTreeState: clean
Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Kubernetes
What happened: { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "VMExtensionProvisioningError", "message": "VM has reported a failure when processing extension 'cse0'. Error message: "Enable failed: failed to execute command: command terminated with exit status=5\n[stdout]\n\n[stderr]\nstat: cannot stat '/opt/azure/containers/provision.complete': No such file or directory\n"." }
What you expected to happen: { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "VMExtensionProvisioningError", "message": "VM has reported a failure when processing extension 'cse0'. Error message: "Enable failed: failed to execute command: command terminated with exit status=5\n[stdout]\n\n[stderr]\nstat: cannot stat '/opt/azure/containers/provision.complete': No such file or directory\n"." }
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:
@IvanCaro could you paste the api model that you passed as input to acs-engine?
@JackQuincy I wonder if cse has an non-idiomatic execution context for this change in some cases:
https://github.com/Azure/acs-engine/commit/b5eb43b47f17d8db54ba9bfcd2a9c07bda3e6582#diff-95c1c34f292e829cdcc06906aaf5c4f1
Does it make sense that a stat failure like the above would ever short-circuit as currently implemented?
Only reason I could see this failing is if we called set -x or something of the sort earlier in the line/command which would be in parameters common etc.
@JackQuincy I can reproduce consistently when specifying "orchestratorRelease": "1.6". @IvanCaro Were you attempting to build a 1.6 cluster when you received this error?
hey @jackfrancis this happened with customVnet and DNS Servers, i created the cluster without DNS (i used azure provider) and after i changed (this works).
@jackfrancis @JackQuincy Even I have faced this issue before and when I change the location and redeploy it worked. This issue is not consistent and its not happening all time.
@IvanCaro Do you agree this is an indeterminate, ephemeral issue and we should close this?
Same issue here using Kubernetes 1.6 as an orchestrator and customVnet. Is there a workaround for this?
Update: I had to add maxPods value into the api model, otherwise the value would be empty and prevent the kubelet from starting.
I found that I was having this because my nodes (master and agents) were not able to hit the k8s.gcr.io to download kubectl. I discovered this by logging into the master and looking at /var/log/cluster-provision.log, which ended with:
+ echo 'kubernetes did not start'
kubernetes did not start
+ exit 3
I traced this back to here - https://github.com/Azure/acs-engine/edit/master/parts/k8s/kubernetesmastercustomscript.sh#L571
This indicated it was having trouble running kubectl, so I tried invoking it from the ssh terminal. Low and behold - command not found. That file lead me to the fact that it's installed using a service called kubectl-extract. Looking at its logs using sudo journalctl -n -u kubectl-extract I found the following output:
Jan 17 05:16:15 k8s-master-42756516-0 systemd[1]: Failed to start Kubectl extraction.
Jan 17 05:16:15 k8s-master-42756516-0 systemd[1]: kubectl-extract.service: Unit entered failed state.
Jan 17 05:16:15 k8s-master-42756516-0 systemd[1]: kubectl-extract.service: Failed with result 'exit-code'.
Jan 17 05:16:20 k8s-master-42756516-0 systemd[1]: kubectl-extract.service: Service hold-off time over, scheduling restart.
Jan 17 05:16:20 k8s-master-42756516-0 systemd[1]: Stopped Kubectl extraction.
Jan 17 05:16:20 k8s-master-42756516-0 systemd[1]: Starting Kubectl extraction...
Jan 17 05:16:35 k8s-master-42756516-0 docker[45966]: Error response from daemon: Get https://k8s-gcrio.azureedge.net/v2/hyperkube-amd64/manifests/v1.7.9: Get https://k8s.gcr.io/v2/token?scope=repository%3Ahyperkube-amd64%3Apull&service=k8s.gcr.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Jan 17 05:16:35 k8s-master-42756516-0 systemd[1]: kubectl-extract.service: Control process exited, code=exited status=1
So there was a problem downloading kubectl from k8s.gcr.io. Turns out it was a DNS problem, but that's just my network... Hope this helps someone debug a related issue.
I ran into this as well. It failed when ran in westus2. I changed to eastus and it worked
I'm having same issues when deploying to custom VNET on WestEurope using acs-engine 0.12.4 and Kubernetes 1.9.1. I've backuped all logs from /var/log/azure & /var/log/containers if it can help.
Just to acknowledge this. I get the exact same thing, custom VNET in West Europe, North Europe works just fine.
Update: This is flaky somehow, now I can't deploy without custom VNET without it getting stuck on the extension for the master node. It's a mixed cluster with windows and Linux agent pools. This is a setup that worked last week. Taking the exact same output from acs-engine and deploying it to North Europe works fine.
I got the same error and the problem was the DNS resolution at the VNET. After I fixed my custom DNS servers to resolve internet names everything worked fine.
I'm getting this error with or without custom VNET. I get it from the simplest of configurations in West Europe, then I deploy the same generated arm template to North Europe and it works. It's related to this I'm guessing, https://github.com/Azure/acs-engine/issues/2162.
And here is the build from a pull request with a potential fix that still failed, https://circleci.com/gh/Azure/acs-engine/14298?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
//Morten
cse* errors generally are a result of the provisioning process on the host failing. I'd like to keep this ticket open to encourage folks to share (bad) experiences. We're working on (1) improving logging around this and (2) hunting down transient errors (such as lack of DNS access would incur) and try, where appropriate, to introduce add'l resilience.
also met same problem in eastus. cse0 timed out and the master VM can't ssh
Just identified one cause of transient cse errors (DNS availability race condition on cluster provisioning), added some retry resiliency and am hoping that eliminates that symptom. @feiskyer please try to repro using master next week and let me know if you can, thanks!
@jackfrancis sure
@jackfrancis Thanks for pushing the fix. I've tested with the latest master, but unfortunately it didn't help in my case.
I consistently face this issue if networking is set to azure. However, even before your fixes I was able to deploy at least several times in a row with networking set to none (for some reason networking was extremely unreliable so that's not a solution) and haven't had it failing.
In case this is useful, here's my template:
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.9",
"orchestratorVersion": "1.9.2",
"kubernetesConfig": {
"networkPolicy": "azure"
}
},
"masterProfile": {
"count": 1,
"dnsPrefix": "my-prefix",
"vnetSubnetId": "<value>",
"firstConsecutiveStaticIP": "172.19.5.100",
"vmSize": "Standard_D2_v2"
},
"agentPoolProfiles": [{
"availabilityProfile": "AvailabilitySet",
"count": 2,
"name": "pool1",
"OSDiskSizeGB": 400,
"storageProfile" : "ManagedDisks",
"vmSize": "Standard_D2_v2",
"vnetSubnetId": "<value>",
"osType": "Linux",
"distro": "ubuntu"
}],
"linuxProfile": {
"adminUsername": "<value>",
"ssh": {
"publicKeys": [{ "keyData": "<value>" }]
},
"secrets": []
},
"servicePrincipalProfile": {
"clientId": "<value>",
"secret": "<value>"
},
"certificateProfile": {}
}
}
And my acs-engine version output:
Version: canary
GitCommit: 7923b960
GitTreeState: clean
Just tried with calico and it worked fine. Seems to be just azure that's affected in my case.
I've been testing a lot to day with ace-engine 0.12.5 and I've yet to run into this issue. Last week with 0.12.4 and 0.12.2 I got it all the time. So it seems to be much better 👍
@ilyalukyanov This PR also moves the ball forward:
https://github.com/Azure/acs-engine/pull/2196
That is aimed for master today, should reduce further cse flakiness.