2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Prefer shortname for collective

When a colleective begins, default
to using the shortname, even
if gethostname returns a long one.
This commit is contained in:
Jarrod Johnson 2022-01-06 12:38:15 -05:00
parent 8da513b152
commit 22024b23b8

View File

@ -237,7 +237,7 @@ def get_myname():
mycachedname[1] = time.time()
return mycachedname[0]
except IOError:
myname = socket.gethostname()
myname = socket.gethostname().split('.')[0]
with open('/etc/confluent/cfg/myname', 'w') as f:
f.write(myname)
mycachedname[0] = myname