dstack
dstack copied to clipboard
Check port forwarding before switching SSH instance from `pending` to `idle`
Problem
If an SSH instance forbids port forwarding with AllowTcpForwarding no, dstack does not detect this configuration error at dstack apply time. The instance is marked as idle and dstack apply exits successfully. The instance is then marked as unreachable immediately after that.
This is counterintuitive and the error can remain unnoticed by the user.
Solution
Check port forwarding before marking the instance as idle. For example, replace this health check that runs curl on the instance with the regular health check that uses port forwarding and calls shim from the server.
Workaround
No response
Would you like to help us implement this feature by sending a PR?
Yes