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

Random Windows node stops working with "NetworkPlugin cni failed to set up pod ..." error

Open abaymar opened this issue 8 years ago • 14 comments

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.

abaymar avatar Dec 03 '18 19:12 abaymar

Try the workaround in #4046

zhiweiv avatar Dec 04 '18 03:12 zhiweiv

@zhiweiv, there are 4 or 5 different suggestions given at #4046. Which one?

abaymar avatar Dec 04 '18 11:12 abaymar

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

zhiweiv avatar Dec 05 '18 00:12 zhiweiv

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.

zhiweiv avatar Dec 05 '18 07:12 zhiweiv

Yes, the fix also worked in my case. The node hadn't crashed before the problem appeared though.

abaymar avatar Dec 05 '18 12:12 abaymar

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 avatar Jan 11 '19 21:01 daschott

@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?

abaymar avatar Jan 11 '19 21:01 abaymar

  1. Delete any Kubernetes resources created on the node / cordon the node.
  2. Open Admin powershell window on Windows node, and run the following:
  3. Stop-Service Kubelet -Force
  4. Download Azure-CNI v1.0.16 for Windows, extract & replace .exe binaries in c:\k\azurecni\bin\*
  5. Replace 10-azure.conflist in C:\k\azurecni\netconf\. If you did any custom changes to it, re-apply them to the new 10-azure.conflist.
  6. Remove C:\k\azure-vnet*[.lock|.json] (same as workaround)
  7. 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.

daschott avatar Jan 11 '19 21:01 daschott

Great - thank you @daschott

abaymar avatar Jan 11 '19 21:01 abaymar

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

  1. 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/

  2. RDP to the Windows node (Note: Credentials in apimodel.json)

  3. 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

  4. Terminate the RDP session

  5. Detach the public IP address from the Windows node

  6. Reboot VM

Gothic-X avatar Jan 23 '19 22:01 Gothic-X

👋 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 22 '19 16:03 welcome[bot]

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?

wesleyae avatar May 22 '19 19:05 wesleyae

Actually, I think this is the real issue: https://github.com/Azure/azure-container-networking/issues/339

wesleyae avatar Jun 13 '19 14:06 wesleyae

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.

stale[bot] avatar Aug 12 '19 15:08 stale[bot]