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

Empty hostname in VM #172

Open
mateuszsrebrny opened this issue Aug 30, 2023 · 2 comments · Fixed by golemfactory/yagna#3333 · May be fixed by #190
Open

Empty hostname in VM #172

mateuszsrebrny opened this issue Aug 30, 2023 · 2 comments · Fixed by golemfactory/yagna#3333 · May be fixed by #190
Assignees

Comments

@mateuszsrebrny
Copy link

mateuszsrebrny commented Aug 30, 2023

Our VMs seem to have an empty hostname.

It is a problem when you want to run a code that tries to use this hostname :)
For example on Ray documentation site there is a super easy example code that runs tasks on a couple of workers and then uses python socket.gethostbyname(socket.gethostname()) to print how many tasks it executed on which worker. This code segfaults. We know it, and we can fix (either the app or our requestor), but it might be super confusing for people trying their stuff.

IIUC docker sets hostname for its vms for container id - so if we don't it is an incompatibility.

I don't know how problematic it is in general, in Ray on Golem we will set the hostname manually after the VM is up, but maybe it would be prudent to set the hostname at least to something that doesn't segfault your app :)

@nieznanysprawiciel nieznanysprawiciel changed the title empty hostname Empty hostname in VM Aug 30, 2023
@mateuszsrebrny
Copy link
Author

@shadeofblue believes that even without fixing deserves a mention in the documentation (where we describe docker vs VM differences) and maybe example showing how to set the hostname manually :)

@mateuszsrebrny
Copy link
Author

A note about workaround:
You can set hostname manually using run command. https://www.redhat.com/sysadmin/configure-hostname-linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants