Description
Steps to reproduce the issue:
Minikube running with docker driver on macOS Catalina
minikube tunnel
- On another terminal:
kill -INT <PID_OF_THE_PREVIOUS_COMMAND>
ps aux | grep minikube
Full output of failed command:
The ps
command will show multiple ssh tunnels still open, outliving the parent process.
Details
In pkg/minikube/tunnel/kic/ssh_tunnel.go the interrupt signal is caught and it stops the LoadBalancerEmulator. However, it assumes that the interrupt will also propagate to the children ssh tunnels, which are running in a goroutine inside startConnections
.
The interrupt, however, kills the goroutine and the blocking call which waits for the child process to finish. This leaves the ssh tunnels dangling.
On the other hand, if CTRL + C
is sent on the same terminal as minikube tunnel
and the clean-up routine included killing all ssh tunnels, the OS would error with "process already finished".