-
Notifications
You must be signed in to change notification settings - Fork 518
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
Can't get template variable substitution to work with profile releases #2710
Comments
I have added the non working configuration to this repo, under the linked branch (non_working_profiles) https://github.com/fkrause98/rc_example/tree/non_working_profiles. You should be able to reproduce this error by just cloning, doing You might get this error output:
But the error is still the same, an invalid node name and inside the error output: {{node}} instead of its substitution |
My guess is that overlays are getting overwritten in a later pass when My understanding is that the overlays and sys.config files are not expected to be part of the same set, but rather operate as unrelated elements. |
Sorry, I don't think I follow you quite right, can you go a bit more into detail? 😅 |
Okay I found the issue and it's a quick fix: #2711 |
Ok, I fixed It locally, for some reason the variable {relx, [{release, {rc_example, "0.1.0"}, [rc_example]},
{dev_mode, true},
{include_erts, false},
{sys_config, "conf/sys.config"},
{vm_args, "conf/vm.args"},
{extended_start_script, false},
{overlay, [{template, "conf/sys.config", "releases/{{default_release_version}}/sys.config"},
{template, "conf/vm.args", "releases/{{default_release_version}}/vm.args"}]}]}.
To this {relx, [{release, {rc_example, "0.1.0"}, [rc_example]},
{dev_mode, true},
{include_erts, false},
{sys_config, "conf/sys.config"},
{vm_args, "conf/vm.args"},
{extended_start_script, false},
{overlay, [{template, "conf/sys.config", "releases/{{release_version}}/sys.config"},
{template, "conf/vm.args", "releases/{{release_version}}/vm.args"}]}]}. Fixes my issue, at least |
Pre-Check
Environment
rebar3 report
to your message:Current behaviour
Expected behaviour
I expected the release to be executed, and have as node name "[email protected]" as I have stated in my config, seems like the node name is not setting as it should be because of the
[#{clean_halt => true,name => '{{node}}'...
line in the error output. If I hard code the values, the release works.This is what I have in my rebar.config:
And inside each profile file:
This variables are supposed to be used by both the sys.config and vm.args files:
I've been reading rebar3's documentation and everything looks ok, I can't really figure out/debug why the node's name is not setting as it should be. If it helps, I'm following this (outdated) tutorial https://github.com/lambdaclass/riak_core_tutorial#3-setting-up-the-cluster which was originally written for OTP 19, 20 and 21 and rebar 3.6.1.
The text was updated successfully, but these errors were encountered: