-
-
Notifications
You must be signed in to change notification settings - Fork 43
feat: epmdless clustering #205
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
Conversation
fccf784 to
4bffe9b
Compare
apps/expert/rel/remote.vm.args.eex
Outdated
| ## Enable deployment without epmd | ||
| ## (requires changing both vm.args and remote.vm.args) | ||
| -epmd_module Elixir.XPForge.EPMD | ||
| -start_epmd false -dist_listen false |
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 don't think we need the -dist_listen false anymore
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.
Yeah, this is a leftover of me splitting hairs
Are you seeing this in tests or when you actually put it up? |
|
@mhanberg both in tests and when building a release, I'm getting this error: |
What stands out to me is that the module name is not namespaced. |
apps/engine/lib/engine/bootstrap.ex
Outdated
| require Logger | ||
|
|
||
| def init(%Project{} = project, document_store_entropy, app_configs) do | ||
| Application.put_env(:kernel, :epmd_module, Forge.EPMD, persistent: true) |
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.
Do you know why this is necessary?
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't not or it should not be, I'm trying out things from the Livebook codebase
It seems like the vm tries to find the EPMD module before loading the code paths provided via -pa
Here in particular I was trying to not specify the epmd module with erl flags and instead try to change the epmd module after the engine node starts. This line wasn't reached because the rpc command to bootstrap didn't get through, but this in the -e flag doesn't help either
Ah, that log is from running tests, where namespacing doesn't run |
4bffe9b to
bb5c93b
Compare
|
I can reproduce the same issues on a barebones mix project: https://github.com/doorgan/epmdless It does partially work if I follow @josevalim's example and run |
|
I haven't researched further to validate and find a solution, but I believe the reason this is happening in the engine but not in expert is because expert is started as a release, which i believe by default loads all modules before the app starts. Normal Relevant section from the release docs at https://hexdocs.pm/elixir/releases.html#operating-system-scripts |
|
I can take a look later but in Livebook we don't start the node in the release, we explicitly call |
a4d4585 to
d3db3c4
Compare
d3db3c4 to
ab64607
Compare
|
@josevalim thanks for all the help! This PR is now ready for testing and review |
| (cd "apps/$proj" && elixir --erl "-start_epmd false -epmd_module Elixir.Forge.EPMD" -S mix {{args}}) | ||
| ;; | ||
| engine) | ||
| (cd "apps/$proj" && elixir --erl "-start_epmd false -epmd_module Elixir.Forge.EPMD" -S mix {{args}}) |
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 think it's still useful to keep them separate even if they're the same right now but I don't feel strongly about it
| you must set the environment variable ELIXIR_ERL_OPTIONS="-epmd_module #{Forge.EPMD}" | ||
| """) | ||
| end | ||
| 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.
Should we do this when expert boots rather than when we try to start a child node?
|
|
||
| ## Enable deployment without epmd | ||
| ## (requires changing both vm.args and remote.vm.args) | ||
| -epmd_module Elixir.XPForge.EPMD |
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.
Please double check this is indeed necessary. You may be fine using epmd for remote debugging (or maybe remote debugging is pointless).
josevalim
left a comment
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.
Looks good to me! I have added some comments but none of them are stoppers (and they might be wrong :D)
mhanberg
left a comment
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.
Works on my corporate macbook and on my personal linux desktop
![]()
4a6b4d7 to
c705958
Compare
Alternative to #191 without introducing dependencies.
TODO:
Forge.EPMDdoes not exist.