一、k8s集群pod一直terminating问题的排查
现象描述:
pod一直处于terminating状态,或者很久才能删除,内核日志中持续打印unregister_netdevice: waiting for XXX to become free. Usage count = 1。
故障诊断:
经过定位和排查,定位到是内核的一个bug导致网络设备无法删除。
具体参考:
route: set the deleted fnhe fnhe_daddr to 0 in ip_del_fnhe to fix a race · torvalds/linux@ee60ad2 · GitHub
另外在github的k8s的issues里也有该bug的相关讨论。有人给出了付现这个问题的方式,以及验证上面提到的修复方法是否有效。下面是按照他给出的方案做的复现和验证。
具体可参考:
https://github.com/moby/moby/issues/5618#issuecomment-549333485。
问题