basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.92k stars 534 forks source link

Fix rpc calls via nodetool #1107

Open martincox opened 2 years ago

martincox commented 2 years ago

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:

image

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

Fixed, by using a proxy function (to swallow the ok, and return rpc_ok instead) in a separate PR in riak_kv: image