mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
When gRPC notifies the kubelet that a connection ended, the kubelet tries to reconnect because it needs to know when a DRA driver comes back. The same code gets called when a connection goes idle, by default after 30 minutes. In that and only that case the conn.Connect call deadlocks while calling into the gRPC idle manager. This can be reproduced with a new unit test which artificially shortens the idle timeout. This fix is to move the Connect call into a goroutine because then both HandleConn and Connect can proceed. It's sufficient that Connect finishes at some point, it doesn't need to be immediately.