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

epmd: Introduce erlang port mapper daemon service #43812

Merged
merged 2 commits into from
Sep 17, 2018

Conversation

binarin
Copy link
Contributor

@binarin binarin commented Jul 19, 2018

Motivation for this change

Having socket-activated epmd means that there always be only a single instance managed centrally. Because Erlang also starts it automatically if not available, and in worst case scenario 'epmd' can
be started by some Erlang application running under systemd. And then restarting this application unit will cause complete loss of names in 'epmd' (if other Erlang system are also installed on this host).

E.g. see at which lengths RabbitMQ goes to recover from such situations:
https://github.com/rabbitmq/rabbitmq-server/blame/7741b37b1efa97ac9b17685cc626bd35ee52ca16/src/rabbit_epmd_monitor.erl#L36

Having the only one socket-activated epmd completely solves this problem.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@binarin
Copy link
Contributor Author

binarin commented Jul 19, 2018

Also I've addressed @peterhoeg comments from #34265 in this PR

@GrahamcOfBorg GrahamcOfBorg added 6.topic: erlang 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: clean-up 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 11-100 labels Jul 19, 2018
@peterhoeg
Copy link
Member

Apart from one tiny thing, this is great!

Alexey Lebedeff added 2 commits July 19, 2018 17:32
That way 'epmd' can be started by systemd using socket
activation. This is important to have when there is more than one
Erlang system used on the same host.

Support for this exists since 17.0:
erlang/otp@b7c95ea

Configure flag was added in 17.1:
erlang/otp@12cd5e5
Having socket-activated epmd means that there always be only a single
instance managed centrally. Because Erlang also starts it
automatically if not available, and in worst case scenario 'epmd' can
be started by some Erlang application running under systemd. And then
restarting this application unit will cause complete loss of names in
'epmd' (if other Erlang system are also installed on this host).

E.g. see at which lengths RabbitMQ goes to recover from such
situations:
https://github.com/rabbitmq/rabbitmq-server/blame/7741b37b1efa97ac9b17685cc626bd35ee52ca16/src/rabbit_epmd_monitor.erl#L36

Having the only one socket-activated epmd completely solves this
problem.
@binarin binarin mentioned this pull request Jul 20, 2018
8 tasks
@binarin
Copy link
Contributor Author

binarin commented Sep 14, 2018

Hi @peterhoeg. I've removed BindIPv6Only completely. Can it be merged now?

@peterhoeg peterhoeg merged commit 3904016 into NixOS:master Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: erlang 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants