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

Add support for port 0 for logging #192

Open
andyneff opened this issue Apr 23, 2024 · 0 comments
Open

Add support for port 0 for logging #192

andyneff opened this issue Apr 23, 2024 · 0 comments

Comments

@andyneff
Copy link
Member

Starting multiple terra runs in quick succession can hit a race condition in the log port if each process is manually checking if a port is available.

A good solution is to just let the OS pick a port for you (via port 0). But we need to add special support for this.


I've investigated the future compatibility of this feature some.

  • Eventually, I want to use an AF_UNIX file socket, however in windows, this feature was never added to python (due to MS having half assed support for things like UDP)
  • The plan was to eliminate using INET for most use case, however there will still be many cases that will still need AF_INET
    • Windows. When using virtualenv, localhost will be acceptable, but on docker compute, we will be back to needing the actual IP, and depending on the configuration of the computer, we will need the same TERRA_RESOLVE_HOSTNAME workaround
    • Distributed computing (celery) will need AF_INET for sure.
  • WSL and Linux will should be able to use AF_UNIX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant