Random Windows node stops working with "NetworkPlugin cni failed to set up pod ..." error
Is this a request for help?: yes
Is this an ISSUE or FEATURE REQUEST? (choose one): ISSUE
What version of acs-engine?: v0.25.3
Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Kubernetes, Windows nodes 1709
What happened:
Nodes randomly start failing in a few days of use. New pods stop being created on a particular node, with the error being Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "my-pod-648b47bcc-hj8tm_t-1ea5c65c-0824-4d63-8f5f-f8e820322e28" network: netplugin failed but error parsing its diagnostic message "": unexpected end of JSON input
Same deployment succeeds on other nodes.
kubectl get nodes returns node status as "Ready".
Restarting the node doesn't help. Recreating the cluster fixes the issue for a few days, then a random node goes bad again
What you expected to happen:
Nodes should be stable
How to reproduce it (as minimally and precisely as possible):
Create a cluster with a few Windows nodes, use it with a few pods. One of the nodes will stop creating new pods in a few days.
Anything else we need to know:
The node shows no resource stress.
Try the workaround in #4046
@zhiweiv, there are 4 or 5 different suggestions given at #4046. Which one?
Remote into Windows node
Stop-Service Kubelet -Force
<del azure-vnet.json file, if exist> <del azure-vnet-ipam.json file, if exist> <del azure-vnet.json.lock, if exist>
Start-Service kubelet
I got same issue again today, resolved by the the workaround.
My problematic Windows node crashed intermittently due to #3798 , I haven't observed this issue on other nodes which didn't crash.
You can try the patch from #3798 , I plan to use Windows Server 2019 soon, hotfix for 2019 is not ready yet.
Yes, the fix also worked in my case. The node hadn't crashed before the problem appeared though.
Can you please use azure CNI v1.0.16 and confirm whether this issue is resolved?
Also, for node stability issues for WS2019, there is a hotfix that should come out on 01/29 as KB4476976.
@daschott , thank you David. Do need to redeploy my cluster with "azureCNIVersion": "v1.0.16" value in apimodel.json generated by aks-engine? Any way to do it for an already existing cluster so that there is not much downtime involved?
- Delete any Kubernetes resources created on the node / cordon the node.
- Open Admin powershell window on Windows node, and run the following:
Stop-Service Kubelet -Force- Download Azure-CNI v1.0.16 for Windows, extract & replace .exe binaries in
c:\k\azurecni\bin\* - Replace
10-azure.conflistinC:\k\azurecni\netconf\. If you did any custom changes to it, re-apply them to the new10-azure.conflist. - Remove C:\k\azure-vnet*[.lock|.json] (same as workaround)
- Reboot or simply run
Start-Service Kubelet; Start-Service Kube-Proxy
You can double-check that it replaced afterwards by checking that the azure CNI logs are reporting the new version.
Great - thank you @daschott
Here is the expanded steps I ran to address this issue
Note: Only do this after you have deleted or cordoned any pods running on any of the Windows node
-
Attach a public IP address to the Windows node Steps: How to add a public IP address to a VM: https://www.mismosystems.com/2017/12/26/add-static-public-ip-address-to-an-existing-azure-vm/
-
RDP to the Windows node (Note: Credentials in apimodel.json)
-
Run the following steps inside the command window:
a) Powershell b) cd
c) Stop-Service Kubelet -Force d) Invoke-WebRequest -Uri https://github.com/Azure/azure-container-networking/releases/download/v1.0.16/azure-vnet-cni-windows-amd64-v1.0.16.zip -OutFile c:\azure-vnet-cni-windows-amd64-v1.0.16.zip e) Expand-Archive c:\azure-vnet-cni-windows-amd64-v1.0.16.zip f) cd c:\azure-vnet-cni-windows-amd64-v1.0.16 g) copy * c:\k\azurecni\bin
h) copy 10-azure.conflist c:\k\azurecni\netconf
i) cd c:\k j) del azure-vnet*.lock k) del azure-vnet*.json l) Start-Service Kubelet -
Terminate the RDP session
-
Detach the public IP address from the Windows node
-
Reboot VM
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
Still having this issue with v1.0.18 of the azure-vnet-cni plugin with Windows Server 2019. Has there been any movement on this?
Actually, I think this is the real issue: https://github.com/Azure/azure-container-networking/issues/339
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.