kubevirt: Virt-handler heartbeat causes the vm to be restarted when kubelet is restarted.
What happened: Virt-handler heartbeat causes the vm to be restarted when kubelet is restarted.
The virt-handler device_controller is watching the kubelet.sock file, and when kubelet restarts, dpi.initialized is set to false. If virt-handler executes a heartbeat at this time, the kubevirt.io/schedulable label of the node will be set to false. After kubelet restarts, kubelet will kill pods that do not match the node label.(virt-launcher pod nodeSelector is kubevirt.io/schedulable: "true")The virt-launcher pod will be killed by kubelet, causing the vm to restart.
related: https://github.com/kubernetes/kubernetes/issues/123980 https://github.com/kubernetes/kubernetes/issues/124586 https://github.com/kubevirt/kubevirt/issues/11662
How to reproduce it (as minimally and precisely as possible):
Restart kubelet every 1s until the kubevirt.io/schedulable label on the node becomes false. Or delete virt-handler pod, set the kubevirt.io/schedulable label on the node to false, then restart kubelet.
Environment:
- KubeVirt version (use
virtctl version): 0.42.1 - Kubernetes version (use
kubectl version): 1.22 - VM or VMI specifications: N/A
- Cloud provider or hardware configuration: N/A
- OS (e.g. from /etc/os-release): N/A
- Kernel (e.g.
uname -a): N/A - Install tools: N/A
- Others: N/A
I believe the solution to this problem: Fix the issue of kubelet kill pods that do not match the node label when restarting(https://github.com/kubernetes/kubernetes/pull/124367), or Improve the virt-handler heartbeats.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 22 (10 by maintainers)
Is there any workaround for this issue? this is blocking us from upgrading Kubernetes