Skip to content

PV_ discovery mechanism causing slow shell #918

@rmvangun

Description

@rmvangun

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:

  1. 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 --cleanup mechanism. In particular, it ought to know to remove those specific folders if the env vars are defined.
  2. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions