Closed Bob-The-Marauder closed 3 years ago
I have no objections to this - no reason why it should impact anything else.
@Bob-The-Marauder does riak-debug need to be symlinked to /usr/sbin? Or can it work in the same way as admin and repl via script extensions? I can't remember whether the script extensions do a node check before execution.
Sorry, I'm asking questions that have already been answered (I should read the comments first). I'm curious as to why it doesn't work in the same way as admin and repl still, though. I can't say as I've ever used debug tbh - do we run it against a running node (in which case the node up check should be fine)?
riaknostic is missing as a dependency (it got stripped out for 3.0). so this needs to be added back in for riak admin diag
to work. Otherwise:
RPC to 'riak@127.0.0.1' failed: {'EXIT',
{undef,
[{riaknostic,main,[["--etc","--base"]],[]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,197}]}]}}
The riaknostic repo has dialyzer/xref failures on the develop-3.0
branch so this needs some work before it can be added in.
So there appear to be problems with the symbolic link:
martin_sumner@riak-ubuntu18:~/dbroot/riak$ sudo dpkg -i rel/pkg/packages/riak_3.0.2diag1-OTP22.3_amd64.deb
Selecting previously unselected package riak.
(Reading database ... 202026 files and directories currently installed.)
Preparing to unpack .../riak_3.0.2diag1-OTP22.3_amd64.deb ...
Unpacking riak (3.0.2diag1-OTP22.3) ...
Setting up riak (3.0.2diag1-OTP22.3) ...
Installing new version of config file /etc/riak/riak.conf ...
ln: failed to create symbolic link '/usr/sbin/riak-debug': File exists
dpkg: error processing package riak (--install):
installed riak package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.42) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
riak
I suspect dpkg -r
isn't removing the link, and so when I reinstall the install package fails on hitting the link
There's more work to be done here.
I've managed to get riaknostic loading, without crashing riak. However, not it can't load the vm.args:
RPC to 'riak@127.0.0.1' failed: {'EXIT',
{function_clause,
[{string,substr,
["/var/lib/riak/sys.config",1,-1],
[{file,"string.erl"},{line,1909}]},
{riaknostic_config,load_vm_args,0,
...
Presumably the AppIndex - 1
is < 1.
This is caused by the fact that this is now a sys.config not an app.config file. I will hack away for a bit longer to see if I can make this work.
@Bob-The-Marauder Are you OK if we use this PR instead:
https://github.com/basho/riak/pull/1047
It contains modifications to this PR to get it to work on my machine. I didn't find the symlink was necessary, and made some changes so that riaknostic would load and the 'riak admin diag' would run as expected.
I can now dpkg -i ...
sudo service riak start
then sudo riak debug
. Works on Ubuntu 18.
Replaced by #1047
This fix addresses https://github.com/basho/riak/issues/1037 by doing the following:
app_epath.sh
from Riak KV 2.9.7 to/usr/lib64/riak/lib
on rpm builds and/usr/lib/riak/lib
on deb builds from/rel/files/
via an edit torebar.config
./rel/files/riak-debug
to render it compatible with KV 3.0.1./usr/sbin/riak debug
actually executes/usr/lib64/riak/bin/riak-debug -s
for reasons I could neither determine nor fix, I have made a work-around for this by adding a symlink fromriak-debug
to/usr/sbin
in the post-install script for the packages.The symlinks are only a temporary work-around. Once I have worked out why
riak debug
executesriak-debug -s
and fixed it, I'll submit another pull request to update for that and remove the symlinks.