perfsonar / pscheduler

The perfSONAR Scheduler
Apache License 2.0
53 stars 32 forks source link

Reconsider reliance on 'localhost' #1415

Closed mfeit-internet2 closed 3 months ago

mfeit-internet2 commented 3 months ago

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:

mfeit-internet2 commented 3 months ago

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.