-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When there are .volumes/pvc-* folders available, but there is no cluster running, it will slow down the shell due to calling the kube API and timing out. A couple considerations / approaches:
- Why aren't these folders being removed when tearing down the cluster? The underlying docker-compose down command ought to remove those folders. It might also be worth investigating the
windsor down --cleanupmechanism. In particular, it ought to know to remove those specific folders if the env vars are defined. - Another mechanism that might be worth looking in to, is if a folder exists, but the corresponding volume doesn't exist, the folder should be removed and the environment variable unset.
Generally, making network calls or doing anything inefficient or potentially slow in windsor env is bad news. In this case, we leverage a cache mechanism if the PV_* var is already defined. So the specific problem in this case is that, since the pvc- folder exists, it tries to find it on the cluster. But if the cluster isn't there, it never creates the PV_ env var, and so it keeps trying on every windsor env.
There may be a small pre-req that may make this easier. If the problem really comes down to missing these folders on windsor down --clean, we should consider a Clean() method on the EnvPrinter so each printer knows how to clean up after itself.