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

allow worker to work when a host has multiple IP addresses #1879

Merged
merged 1 commit into from
Jan 3, 2013

Conversation

swadey
Copy link
Contributor

@swadey swadey commented Jan 3, 2013

This is the body of the email i sent to julia-dev:

I've been trying to run a couple of parallel things and I've come across two problems:

  1. I'm unable to start julia with workers when I'm connected to my institute's vpn. I get this error:

$ julia -p 4
could not connect to 192.168.1.106:9012, errno=60

in Worker at multi.jl:110
in Worker at multi.jl:115
in start_remote_workers at multi.jl:947
in addprocs_local at multi.jl:1008
in process_options at client.jl:202
in _start at client.jl:255

The problem seems to be that when julia launches workers, it expects them to report their IP addresses (even if the worker is started locally). If a machine has multiple addresses, the first non loopback adapter is chosen (via a call to getipaddr() which c-calls getlocalip()), which results in:

$ julia --worker
julia_worker:9021#192.168.1.106

The problem is that many VPNs (including our) don't allow bridging, so when the VPN is connected, connections to the primary adapter are blocked.

I worked around this by adding a mode argument to --worker:

--worker local
--worker remote

start_worker() checks this flag to decide whether to use "localhost" or the result of getipaddr().

@ViralBShah
Copy link
Member

Is it possible to create this pull request without all the Merges? I guess they can be squashed, or it may just be simpler to create a new pull request.

@swadey
Copy link
Contributor Author

swadey commented Jan 3, 2013

sure, let me look into it.

thanks,
wade

On Wed, Jan 2, 2013 at 9:16 PM, Viral B. Shah [email protected]:

Is it possible to create this pull request without all the Merges? I guess
they can be squashed, or it may just be simpler to create a new pull
request.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1879#issuecomment-11833133.

@swadey swadey closed this Jan 3, 2013
ViralBShah added a commit that referenced this pull request Jan 3, 2013
allow worker to work when a host has multiple IP addresses (remove merges from #1879)
@vtjnash
Copy link
Member

vtjnash commented Jan 3, 2013

This is interesting, but I think it is incorrect and should be reverted. With this patch, if i understand correctly, I think it is now impossible to use both local workers and remote workers (although I didn't test it). The better behavior might be to store all available (non-loopback) ip-addresses and try each in turn from the destination node.

@vtjnash vtjnash reopened this Jan 3, 2013
@vtjnash vtjnash merged commit 8d3d902 into JuliaLang:master Jan 3, 2013
@swadey
Copy link
Contributor Author

swadey commented Jan 4, 2013

Hi Jameson, I don't think that's a problem. Only in local mode does localhost get used as the addr for a worker. In the remote case, things work exactly as they did before.

@vtjnash
Copy link
Member

vtjnash commented Jan 4, 2013

In local-only and remote-only mode, it would be OK. However, the reported ip address is used by all computers, so in a mixed environment, this will break existing usage. There is an implicit assumption in the rest of the code that all workers can talk to any other worker given the ip address reported by the worker.

@ViralBShah
Copy link
Member

@vtjnash Do you still think we should revert/rework this?

@swadey
Copy link
Contributor Author

swadey commented Jan 4, 2013

Jameson is right, this breaks mixed mode environments and should be reverted (since I think the VPN scenario is less common). Now that I'm back in the office, I was able to setup a test with our cluster and it does, in fact, break mixed mode configurations.

I'm not sure how to solve this in general. The problem is the assumption that getipaddr() returns an address that is reachable by everyone. Perhaps, getipaddr() could check if it's able to connect to a specific address before returning the address?

@aviks
Copy link
Member

aviks commented Jan 4, 2013

Servers generally use something like a --bind-to option in situations like this, for the user to specify which interface to bind onto. So in situations where the default behaviour is incorrect due to complex configuration, you can specify explicitly the interface to use. So for a fully local setup, --bind-to lo . For mixed mode environments with a vpn, you can specify --bind-to vpn-if ..etc..

That may be a generic solution to this problem, rather than simply splitting into local and remote.

@swadey
Copy link
Contributor Author

swadey commented Jan 4, 2013

That seems like a good solution.

On Fri, Jan 4, 2013 at 11:27 AM, Avik Sengupta [email protected]:

Servers generally use something like a --bind-to option in situations
like this, for the user to specify which interface to bind onto. So in
situations where the default behaviour is incorrect due to complex
configuration, you can specify explicitly the interface to use. So for a
fully local setup, --bind-to lo . For mixed mode environments with a vpn,
you can specify --bind-to vpn-if ..etc..

That may be a generic solution to this problem, rather than simply
splitting into local and remote.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1879#issuecomment-11888952.

@ViralBShah
Copy link
Member

Should we then revert this commit and get the generic solution in place as suggested by @aviks? @vtjnash Is that the way to go?

@vtjnash
Copy link
Member

vtjnash commented Jan 5, 2013

Yes, that sounds good. Instead of remote and local, indicate the adapter to bind to. Unfortunately, it still won't work over a VPN that doesn't allow loopback, but that can probably be dealt with separately (if it is needed).

fredrikekre added a commit that referenced this pull request Jun 24, 2020
$ git log --pretty=oneline --abbrev-commit f9a5cc7..f80d443
f80d443 Disable SIGQUIT test that regularly segfaults on CI. (#1883)
2328d1b telemetry: don't send hash without active project
08fe651 telemetry: use RandomDevice for random values
c213096 Improve Artifacts documentation by adding a Basic Usage section (#1879)
d8fde7e fix typo in telemetry notice (#1877)
188893d Merge pull request #1871 from JuliaLang/sk/telemetry
ab88ea9 telemetry notice: reword a bit, factor into function
341dfd0 telemetry: don't send salt hash header
ae99ba2 telemetry notice: only print once per process
636d333 Add a poor-mans file lock for telemetry file.
b24ca68 telemetry: print legal notice first time talking to each pkg server
bd07a8d telemetry: ~/.julia/servers/telemetry.toml for defaults
70dfbd2 telemetry: HyperLogLog estimator
3e3f9d7 README: howto build Julia with git checkout of Pkg (#1864)
100eaa9 Fix bug which made `registry up` a no-op instead of updating all user-registries. (#1862)
fredrikekre added a commit that referenced this pull request Jun 26, 2020
$ git log --pretty=oneline --abbrev=commit f9a5cc7..531861f
531861f6677f434f6d594212d1085ac5bc309328 Make tree hash computation non-fatal when installing artifacts. (#1885)
ce4a41ee7d232b90da925fa9ebe246618de8ada4 Misc fixes (#1884)
f80d44345f61d0c1a02650f33322f9a330aa77d1 Disable SIGQUIT test that regularly segfaults on CI. (#1883)
2328d1bcd919bd9fc038af3f1cedf43a22d28e30 telemetry: don't send hash without active project
08fe651707d6deb392950f71c3ea776a2c8337c9 telemetry: use RandomDevice for random values
c213096ea6210f66945443658b6548012dff5ec9 Improve Artifacts documentation by adding a Basic Usage section (#1879)
d8fde7e85b72c86cdae395a1ea13485c193dc35e fix typo in telemetry notice (#1877)
188893dfdb6608cd5bcab18c6d365843cf1c6056 Merge pull request #1871 from JuliaLang/sk/telemetry
ab88ea9c3ea05a70c2e014e6ceb5ce55a7fa9cf7 telemetry notice: reword a bit, factor into function
341dfd0bfafb994bd7c71271d2a458e314f3af4c telemetry: don't send salt hash header
ae99ba2ed9d9cd7f9962a2515fd62054eb644097 telemetry notice: only print once per process
636d333a263640650d09b08a568e8e128bf6c00c Add a poor-mans file lock for telemetry file.
b24ca68ed000139507d179f49a04df7c7b93d14c telemetry: print legal notice first time talking to each pkg server
bd07a8d6439ffbe55f9aaf22ea5e2c451ee480cb telemetry: ~/.julia/servers/telemetry.toml for defaults
70dfbd2c59c4110a6c4775414202b4df840acf21 telemetry: HyperLogLog estimator
3e3f9d7a3baf3a96c860d2b1bc895d5fd2d40d35 README: howto build Julia with git checkout of Pkg (#1864)
100eaa9b0ea0a2b95072c77bdf7060e72479fe13 Fix bug which made `registry up` a no-op instead of updating all user-registries. (#1862)
fredrikekre added a commit that referenced this pull request Jul 28, 2020
$ git log --pretty=oneline --abbrev=commit f9a5cc7..13456b9
13456b944fd21ec180111c6c29d06b610d47d088 Deprecate the REPL command `] generate` (#1923)
3eee6eb25974c2f320706da1b81ce1f7e1d82165 BinaryPlatforms: Recognize MacOS(:aarch64) (#1916)
a8cc6d670ebe55002c5d5efb7fb19315c0c1cd55 Telemetry CI variables: add CI_SERVER, JULIA_PKGEVAL, JULIA_REGISTRYCI_AUTOMERGE, and PKGEVAL (#1906)
ae897bc44070f902b5b01da80478ed51c1b518c0 Fix invalidations from loading OrderedCollections (#1897)
69bc387b3932d3d709b656e1ef929c4a2592fcee fix path returned from find_install (#1908)
46c9d430d545ecd70b147942857d775b2834e54b Update environments.md (#1896)
20f9b9e14ab59d81991b5984a2f9eb87d38b6230 Merge pull request #1869 from JuliaLang/teh/inval3
605f48849fa6b3bf29e6785967d4ef2249da9976 - only test on nightly, test without Pkg server as well - CI: build docs on nightly
7e0c911591f5d62acb476f74c59a9cad9c7a1f7d Avoid a strange inference limit when broadcasting
f92ee5786468a7d0e836a94b0bb09711faef78da Use `maximum(itr; init=default)`
d524d0f7f8cfef8abe429d3b947157eacb84f8ea Avoid calling ==(::Any, ::Nothing) in read_field
2acb2f9ca7f8b908954d6fdde074b65e30b8395f Add more type info
9b5e38e0ee2a0747b5ca7125a3a1f347cbd61708 Improve inference for Platform
0ebffb95d9793689d4c72198ae4804b0745ee16e Pre-allocate `seen` to improve inference in `unique(f, itr)`
160efbea2b56dc8a7a9a5ed8f795fa8995a4f09b Eliminate some boxing
cdfc445873fc1d5df8838dd080e125bcce587dc6 docs: delete note about gen-project script (#1887)
531861f6677f434f6d594212d1085ac5bc309328 Make tree hash computation non-fatal when installing artifacts. (#1885)
ce4a41ee7d232b90da925fa9ebe246618de8ada4 Misc fixes (#1884)
f80d44345f61d0c1a02650f33322f9a330aa77d1 Disable SIGQUIT test that regularly segfaults on CI. (#1883)
2328d1bcd919bd9fc038af3f1cedf43a22d28e30 telemetry: don't send hash without active project
08fe651707d6deb392950f71c3ea776a2c8337c9 telemetry: use RandomDevice for random values
c213096ea6210f66945443658b6548012dff5ec9 Improve Artifacts documentation by adding a Basic Usage section (#1879)
d8fde7e85b72c86cdae395a1ea13485c193dc35e fix typo in telemetry notice (#1877)
188893dfdb6608cd5bcab18c6d365843cf1c6056 Merge pull request #1871 from JuliaLang/sk/telemetry
ab88ea9c3ea05a70c2e014e6ceb5ce55a7fa9cf7 telemetry notice: reword a bit, factor into function
341dfd0bfafb994bd7c71271d2a458e314f3af4c telemetry: don't send salt hash header
ae99ba2ed9d9cd7f9962a2515fd62054eb644097 telemetry notice: only print once per process
636d333a263640650d09b08a568e8e128bf6c00c Add a poor-mans file lock for telemetry file.
b24ca68ed000139507d179f49a04df7c7b93d14c telemetry: print legal notice first time talking to each pkg server
bd07a8d6439ffbe55f9aaf22ea5e2c451ee480cb telemetry: ~/.julia/servers/telemetry.toml for defaults
70dfbd2c59c4110a6c4775414202b4df840acf21 telemetry: HyperLogLog estimator
3e3f9d7a3baf3a96c860d2b1bc895d5fd2d40d35 README: howto build Julia with git checkout of Pkg (#1864)
100eaa9b0ea0a2b95072c77bdf7060e72479fe13 Fix bug which made `registry up` a no-op instead of updating all user-registries. (#1862)
fredrikekre added a commit that referenced this pull request Jul 29, 2020
$ git log --pretty=oneline --abbrev=commit f9a5cc7..13456b9
13456b944fd21ec180111c6c29d06b610d47d088 Deprecate the REPL command `] generate` (#1923)
3eee6eb25974c2f320706da1b81ce1f7e1d82165 BinaryPlatforms: Recognize MacOS(:aarch64) (#1916)
a8cc6d670ebe55002c5d5efb7fb19315c0c1cd55 Telemetry CI variables: add CI_SERVER, JULIA_PKGEVAL, JULIA_REGISTRYCI_AUTOMERGE, and PKGEVAL (#1906)
ae897bc44070f902b5b01da80478ed51c1b518c0 Fix invalidations from loading OrderedCollections (#1897)
69bc387b3932d3d709b656e1ef929c4a2592fcee fix path returned from find_install (#1908)
46c9d430d545ecd70b147942857d775b2834e54b Update environments.md (#1896)
20f9b9e14ab59d81991b5984a2f9eb87d38b6230 Merge pull request #1869 from JuliaLang/teh/inval3
605f48849fa6b3bf29e6785967d4ef2249da9976 - only test on nightly, test without Pkg server as well - CI: build docs on nightly
7e0c911591f5d62acb476f74c59a9cad9c7a1f7d Avoid a strange inference limit when broadcasting
f92ee5786468a7d0e836a94b0bb09711faef78da Use `maximum(itr; init=default)`
d524d0f7f8cfef8abe429d3b947157eacb84f8ea Avoid calling ==(::Any, ::Nothing) in read_field
2acb2f9ca7f8b908954d6fdde074b65e30b8395f Add more type info
9b5e38e0ee2a0747b5ca7125a3a1f347cbd61708 Improve inference for Platform
0ebffb95d9793689d4c72198ae4804b0745ee16e Pre-allocate `seen` to improve inference in `unique(f, itr)`
160efbea2b56dc8a7a9a5ed8f795fa8995a4f09b Eliminate some boxing
cdfc445873fc1d5df8838dd080e125bcce587dc6 docs: delete note about gen-project script (#1887)
531861f6677f434f6d594212d1085ac5bc309328 Make tree hash computation non-fatal when installing artifacts. (#1885)
ce4a41ee7d232b90da925fa9ebe246618de8ada4 Misc fixes (#1884)
f80d44345f61d0c1a02650f33322f9a330aa77d1 Disable SIGQUIT test that regularly segfaults on CI. (#1883)
2328d1bcd919bd9fc038af3f1cedf43a22d28e30 telemetry: don't send hash without active project
08fe651707d6deb392950f71c3ea776a2c8337c9 telemetry: use RandomDevice for random values
c213096ea6210f66945443658b6548012dff5ec9 Improve Artifacts documentation by adding a Basic Usage section (#1879)
d8fde7e85b72c86cdae395a1ea13485c193dc35e fix typo in telemetry notice (#1877)
188893dfdb6608cd5bcab18c6d365843cf1c6056 Merge pull request #1871 from JuliaLang/sk/telemetry
ab88ea9c3ea05a70c2e014e6ceb5ce55a7fa9cf7 telemetry notice: reword a bit, factor into function
341dfd0bfafb994bd7c71271d2a458e314f3af4c telemetry: don't send salt hash header
ae99ba2ed9d9cd7f9962a2515fd62054eb644097 telemetry notice: only print once per process
636d333a263640650d09b08a568e8e128bf6c00c Add a poor-mans file lock for telemetry file.
b24ca68ed000139507d179f49a04df7c7b93d14c telemetry: print legal notice first time talking to each pkg server
bd07a8d6439ffbe55f9aaf22ea5e2c451ee480cb telemetry: ~/.julia/servers/telemetry.toml for defaults
70dfbd2c59c4110a6c4775414202b4df840acf21 telemetry: HyperLogLog estimator
3e3f9d7a3baf3a96c860d2b1bc895d5fd2d40d35 README: howto build Julia with git checkout of Pkg (#1864)
100eaa9b0ea0a2b95072c77bdf7060e72479fe13 Fix bug which made `registry up` a no-op instead of updating all user-registries. (#1862)
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
$ git log --pretty=oneline --abbrev=commit f9a5cc7..13456b9
13456b944fd21ec180111c6c29d06b610d47d088 Deprecate the REPL command `] generate` (JuliaLang#1923)
3eee6eb25974c2f320706da1b81ce1f7e1d82165 BinaryPlatforms: Recognize MacOS(:aarch64) (JuliaLang#1916)
a8cc6d670ebe55002c5d5efb7fb19315c0c1cd55 Telemetry CI variables: add CI_SERVER, JULIA_PKGEVAL, JULIA_REGISTRYCI_AUTOMERGE, and PKGEVAL (JuliaLang#1906)
ae897bc44070f902b5b01da80478ed51c1b518c0 Fix invalidations from loading OrderedCollections (JuliaLang#1897)
69bc387b3932d3d709b656e1ef929c4a2592fcee fix path returned from find_install (JuliaLang#1908)
46c9d430d545ecd70b147942857d775b2834e54b Update environments.md (JuliaLang#1896)
20f9b9e14ab59d81991b5984a2f9eb87d38b6230 Merge pull request JuliaLang#1869 from JuliaLang/teh/inval3
605f48849fa6b3bf29e6785967d4ef2249da9976 - only test on nightly, test without Pkg server as well - CI: build docs on nightly
7e0c911591f5d62acb476f74c59a9cad9c7a1f7d Avoid a strange inference limit when broadcasting
f92ee5786468a7d0e836a94b0bb09711faef78da Use `maximum(itr; init=default)`
d524d0f7f8cfef8abe429d3b947157eacb84f8ea Avoid calling ==(::Any, ::Nothing) in read_field
2acb2f9ca7f8b908954d6fdde074b65e30b8395f Add more type info
9b5e38e0ee2a0747b5ca7125a3a1f347cbd61708 Improve inference for Platform
0ebffb95d9793689d4c72198ae4804b0745ee16e Pre-allocate `seen` to improve inference in `unique(f, itr)`
160efbea2b56dc8a7a9a5ed8f795fa8995a4f09b Eliminate some boxing
cdfc445873fc1d5df8838dd080e125bcce587dc6 docs: delete note about gen-project script (JuliaLang#1887)
531861f6677f434f6d594212d1085ac5bc309328 Make tree hash computation non-fatal when installing artifacts. (JuliaLang#1885)
ce4a41ee7d232b90da925fa9ebe246618de8ada4 Misc fixes (JuliaLang#1884)
f80d44345f61d0c1a02650f33322f9a330aa77d1 Disable SIGQUIT test that regularly segfaults on CI. (JuliaLang#1883)
2328d1bcd919bd9fc038af3f1cedf43a22d28e30 telemetry: don't send hash without active project
08fe651707d6deb392950f71c3ea776a2c8337c9 telemetry: use RandomDevice for random values
c213096ea6210f66945443658b6548012dff5ec9 Improve Artifacts documentation by adding a Basic Usage section (JuliaLang#1879)
d8fde7e85b72c86cdae395a1ea13485c193dc35e fix typo in telemetry notice (JuliaLang#1877)
188893dfdb6608cd5bcab18c6d365843cf1c6056 Merge pull request JuliaLang#1871 from JuliaLang/sk/telemetry
ab88ea9c3ea05a70c2e014e6ceb5ce55a7fa9cf7 telemetry notice: reword a bit, factor into function
341dfd0bfafb994bd7c71271d2a458e314f3af4c telemetry: don't send salt hash header
ae99ba2ed9d9cd7f9962a2515fd62054eb644097 telemetry notice: only print once per process
636d333a263640650d09b08a568e8e128bf6c00c Add a poor-mans file lock for telemetry file.
b24ca68ed000139507d179f49a04df7c7b93d14c telemetry: print legal notice first time talking to each pkg server
bd07a8d6439ffbe55f9aaf22ea5e2c451ee480cb telemetry: ~/.julia/servers/telemetry.toml for defaults
70dfbd2c59c4110a6c4775414202b4df840acf21 telemetry: HyperLogLog estimator
3e3f9d7a3baf3a96c860d2b1bc895d5fd2d40d35 README: howto build Julia with git checkout of Pkg (JuliaLang#1864)
100eaa9b0ea0a2b95072c77bdf7060e72479fe13 Fix bug which made `registry up` a no-op instead of updating all user-registries. (JuliaLang#1862)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants