Relx 4.5+ makes use of erl_call, which supersedes nodetool, we have to force the use of nodetool as erl_call does not have support for catching stdio (not implemented in relx). This is done via the use of the USE_NODETOOL=1 flag in the run_rpc function.
Without any changes, calling console commands via the usual relx_nodetool rpc method:
Nodetool also changed rpc calls slightly by requiring args as a comma separated list, and changed the expected return from rpc calls, anything other than rpc_ok gets printed to the shell now :/ (it doesn't with this fix).
This was before (trailing ok is printed out from every command:
Fixed, by using a proxy function (to swallow the ok, and return rpc_ok instead) in a separate PR in riak_kv:
Relx 4.5+ makes use of erl_call, which supersedes nodetool, we have to force the use of nodetool as erl_call does not have support for catching stdio (not implemented in relx). This is done via the use of the USE_NODETOOL=1 flag in the run_rpc function.
Without any changes, calling console commands via the usual
relx_nodetool rpc
method:Nodetool also changed rpc calls slightly by requiring args as a comma separated list, and changed the expected return from rpc calls, anything other than rpc_ok gets printed to the shell now :/ (it doesn't with this fix).
This was before (trailing ok is printed out from every command:![image](https://user-images.githubusercontent.com/3169010/162966300-40fcd86f-661f-4e89-89cd-ff916f2493e3.png)
Fixed, by using a proxy function (to swallow the ok, and return rpc_ok instead) in a separate PR in riak_kv:![image](https://user-images.githubusercontent.com/3169010/162966510-406c1cbd-ad8a-46e7-beb5-5dcfd11a11c7.png)