connect_helm connect hangs indefinitely waiting for port forwarding to stop
What happened?
I used vcluster to create a vcluster, and logging (and my own inspection of the cluster) indicated it succeeded, but the command never returned.
What did you expect to happen?
vcluster succeeds and returns.
How can we reproduce it (as minimally and precisely as possible)?
Sorry, don't have a simple repro handy since I encountered this many layers deep within confidential corp infrastructure, but see details below for my theory as to what's happening.
Anything else we need to know?
It looks to me like there's a path where getVClusterKubeConfig will fail to start a docker proxy and fall back to port forwarding, but then that port forwarding never gets cleaned up:
getVClusterKubeConfigstarts port forwarding ifcmd.Server == ""- Nothing (AFAICT) sets
cmd.Server connectcleans up port forwarding only ifcmd.Server != ""
So I think the whole command is blocking on errorChan being closed, which will never happen because interruptChan is never closed.
Host cluster Kubernetes version
Client Version: version.Info{Major:"1", Minor:"27+", GitVersion:"v1.27.14-dispatcher", GitCommit:"643004a51a14c7a149377e6651fb926f17c06c5a", GitTreeState:"clean", BuildDate:"2024-05-15T21:18:29Z", GoVersion:"go1.21.9", Compiler:"gc", Platform:"linux/amd64"} Kustomize Version: v5.0.1
vcluster version
0.20.0
VCluster Config
N/A
Hi @markbradley27
Try with --connect=false flag, this way it won't try any sort of connection, and thus it won't block.
Also, if you keep having the issue, retry with the latest release and update the vcluster version bit in your issue description accordingly. The v0.20.0 is fairly old.
Closing as stale.