Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project up check port availability #229

Open
1 task done
schwobaseggl opened this issue Nov 16, 2021 · 2 comments
Open
1 task done

Project up check port availability #229

schwobaseggl opened this issue Nov 16, 2021 · 2 comments
Labels
2-normal enhancement New feature or request

Comments

@schwobaseggl
Copy link

schwobaseggl commented Nov 16, 2021

When the designated ingress port is already in use, the project fails to come up with an obscure stack trace (this appears to be the same error as in other cases when the k3d cluster fails to be created, e.g. with an incompatible k3d version).

# ...
\[ERROR] Something went completely wrong with the cluster spin up (or we got a timeout).
# ...
File "/home/veit/.local/lib/python3.8/site-packages/src/cli/project.py", line 261, in up
    Telepresence(cluster.storage.get()).start()
  File "/home/veit/.local/lib/python3.8/site-packages/src/local/system.py", line 76, in __init__
    raise ValueError("Project does not contain the kubeconfigPath parameter")
ValueError: Project does not contain the kubeconfigPath parameter

Some foreseeable errors could be checked against in advance (like if the ingress port is available on the host). Also, why not capture the error output of the k3d cluster create command, which in this case would be something like:

ERRO[0021] Failed Cluster Start: Failed to add one or more helper nodes: runtime failed to start node 'k3d-unikube-mumpiz-serverlb': docker failed to start container for node 'k3d-unikube-mumpiz-serverlb': Error response from daemon: driver failed programming external connectivity on endpoint k3d-unikube-mumpiz-serverlb (c58c63548f30caa8b752b2d763ff4990e465e55f6210abe7166e464fdf2004f9): Bind for 0.0.0.0:61348 failed: port is already allocated 
ERRO[0021] Failed to create cluster >>> Rolling Back 

That would immediately reveal the problem.

@schwobaseggl schwobaseggl added the enhancement New feature or request label Nov 16, 2021
@schwobaseggl schwobaseggl changed the title Project up check port availablity Project up check port availability Nov 16, 2021
@SteinRobert
Copy link
Contributor

I suggest we collect use cases and work through each of them individually.

@schwobaseggl
Copy link
Author

I agree on the issue of gracefully handled specific cases. Let's cross each bridge as we get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-normal enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants