Closed bsechter-unext closed 5 years ago
The conclusion of a conversation on the Slack distillery channel is that release tasks are the wrong tool for initializing mnesia databases. Idempotently initializing in the relevant GenServer init
function or at the application level seems to be the way to set up mnesia or other things that need to run on the proper node.
command
also runs in a clean node, so it is expected that there would be no node name, it is also deprecated in 2.0 in favor of the new eval
Steps to reproduce
tl;dr, run
node()
from a release task versus the release console.rel/vm.args (comments removed)
myapp/lib/release_tasks.ex
rel/config.exs (relevant section)
rel/commands/myapp_node
Given the above setup, build a release and compare the output of
node()
function when run in a release task with the same function run when run from the release console.Verbose Logs
Paste the output of the release command you ran with the
--verbose
flag below in the summary tags (this helps keep the issue easy to navigate):Description of issue
I expect to be able to configure to node for release tasks, although I can did not manage to find documentation one way or another. Please let me know if you need anything else.