SSH tunnels left open after sending SIGINT to minikube tunnel
#10752
Labels
area/tunnel
Support for the tunnel command
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone
Steps to reproduce the issue:
Minikube running with docker driver on macOS Catalina
minikube tunnel
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 asminikube tunnel
and the clean-up routine included killing all ssh tunnels, the OS would error with "process already finished".Related issues
#8511
#3647
The text was updated successfully, but these errors were encountered: