-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow bootstrap with no external IP address #5945
Conversation
lgtm |
if externalonly | ||
error("no active external interfaces") | ||
else | ||
return parseip("127.0.0.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be ip"127.0.0.1"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch is updated. That was the first thing I tried, and got this:
multi.jl
ERROR: ip not defined
while loading multi.jl, in expression starting on line 188
while loading /cmn/jldev/base/sysimg.jl, in expression starting on line 138
... but just tried again and it worked. Go figure.
@loladiro ok to merge? not my bailiwick, want to make sure you don't mind adding the keyword argument to |
I'm not opposed, but it is somewhat ugly and only used in one place. Maybe a try/catch block there would be better? |
error("no active external interfaces") | ||
else | ||
return ip"127.0.0.1" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just returning ip"127.0.0.1" if no external interfaces are found? Why does getipaddr()
only have to detect external interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about that - presumably we need a distinction between private-only and public ip addresses?
@loladiro it feels just as ugly to throw an error when a call could/should return the valid available address... |
I'm much happier with just returning |
On the other hand maybe when this happens it's a bug and the user would very much like to know. Maybe keep the current behavior and rename |
My preference would be for It is perfectly reasonable for distributed julia to work properly even on a machine disconnected to a network by communicating via the loopback address. |
@amitmurthy that sounds good. |
Allows building with no external IP address: 62d0b3d4 introduced a dependency on getipaddr(), which previously raised an error if no external address was found. This broke bootstrap on a loopback-only network.
Ok, done. As far as I can tell, edit: well there's this, this, but... no. |
Allows building with no external IP address: 62d0b3d4 introduced a dependency on getipaddr(), which previously raised an error if no external address was found. This broke bootstrap on a loopback-only network. closes #5945
62d0b3d4 introduced a dependency on the availability of an external IP address, via getaddrinfo()
this breaks building when only a loopback address is available, such as on a VM or subway.
This PR fixes the following error during bootstrap, which I saw on the way home this evening and on a VirtualBox-hosted instance over the weekend (but was red-herringed by a Wine error at the time):
cc: @loladiro @amitmurthy