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

Reconsider reliance on 'localhost' #1415

Closed
mfeit-internet2 opened this issue Mar 14, 2024 · 1 comment
Closed

Reconsider reliance on 'localhost' #1415

mfeit-internet2 opened this issue Mar 14, 2024 · 1 comment

Comments

@mfeit-internet2
Copy link
Member

In the library's api.py, this function could be made smarter.

def api_local_host_name():
    "Return the local system's hostname"
    return socket.gethostname()

What it returns now requires that the system's hostname be resolvable. The steps should be as follows:

  • If the hostname resolves, use that.
  • If not, find the IP of a loopback interface and use that.
  • Otherwise, throw an exception.
@mfeit-internet2
Copy link
Member Author

Relase Notes:

pScheduler no longer relies on the system's host name being resolvable to an IP address. While having a resolvable host name is still a recommended practice, it will now revert to the address of a loopback or other interface in its absence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant