You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The start-up logic needs to bind these processes to multiple ports, and when none are configured in advance, the logic looks for unused ports, and then creates files in the user cache directory to reserve them (example).
Therefore, if one were to start multiple test environments in parallel (e.g. in different processes or threads), then some may fail to start since they may end up trying to delete the same file that others have already deleted.
In particular, they may fail to start due to the following error:
unable to start control plane itself: failed to start the controlplane. retried 5 times: lstat /usr/local/home/jcanseco/.cache/kubebuilder-envtest/./port-42369: no such file or directory
unable to start control plane itself: failed to start the controlplane. retried 5 times: remove /usr/local/home/jcanseco/.cache/kubebuilder-envtest/port-36781: no such file or directory
Background
Problem
The same logic used to create files to reserve ports also has logic that deletes files corresponding to "outdated" ports.
Therefore, if one were to start multiple test environments in parallel (e.g. in different processes or threads), then some may fail to start since they may end up trying to delete the same file that others have already deleted.
In particular, they may fail to start due to the following error:
...which comes from this line.
...which comes from this line.
Potential Solution
I have verified that this can be fixed by adding logic along the lines of "don't error out if trying to delete a file that no longer exists".
The text was updated successfully, but these errors were encountered: