Closed brigadier closed 7 years ago
Right, I don't think we'll be able to support both features at the same time unless there were changes to OTP.
What's could be wrong with the app.src way? Let people create vm.args.src with placeholders and rename it to vm.args before each run. It worked almost like this a few versions ago, but it used to rename vm.args to vm.args.orig, so it eventually owerwrited the file with palceholders. Am I missing something?
Ah crap. This was a result of this patch https://github.com/erlware/relx/pull/427
I'm not sure what to do here... Going to have to think more on this.
Seems to me the best option is to make the change from that patch a configuration option, as multi node setups running from the same physical location has to be a pretty rare configuration. You'd still have the same problem when it's enabled, but it would affect a much smaller group of users, who are probably more willing to make tradeoffs in that situation. That said, it does introduce more complexity and configurations to test, so it's not without downsides.
I'm more concerned not about multinode, but about letting people configure cookie. And before this patch it also worked incorrectly, though differently incorrectly - see https://github.com/erlware/relx/issues/561
Extended start/stop script hooks (#445) could be a good replacement instead of RELX_REPLACE_OS_VARS
, that way people can do whatever they want with their sys.config
or vm.args
.
That said i'm inclined to agree with @bitwalker, i also don't really have a good solution for this besides allowing the disable by configuration of the multi-node feature introduced in #427.
@brigadier, could you please try out #563 and check if it fixes this issue?
Yes it does. I've just built rebar with this branch and it fixed both issues. It is quite implicit though.
closing via #563
Erlang allows (http://erlang.org/doc/man/config.html) including config files into application config files with syntax like that:
But it looks like this works only when config file is named exactly
sys.config
. As the newer versions of relx whenRELX_REPLACE_OS_VARS=true
rename sys.config to sys.[nodename].config it is no more possible to include other files.Related discussion: http://erlang.org/pipermail/erlang-questions/2012-October/070278.html