Skip to content
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

Riak admin services shows blank list #8

Open
azowarg opened this issue Jun 27, 2024 · 4 comments · May be fixed by #12
Open

Riak admin services shows blank list #8

azowarg opened this issue Jun 27, 2024 · 4 comments · May be fixed by #12

Comments

@azowarg
Copy link

azowarg commented Jun 27, 2024

Hello, I came to this repo from this issue.
I just wanted to let you know that for some reason in the nhs 3.2.2 version, the command riak admin services shows in the output blank list.

root@riak-0:/var/lib/riak# riak admin services
[]

But I am sure that the service works without problem and for example I can check for it with another command.

root@riak-0:/var/lib/riak# riak admin wait-for-service riak_kv
riak_kv is up
@martinsumner
Copy link

Apologies, this got missed by me and forgotten about.

I can confirm the issue:

% riak admin services
[]
% riak rpc riak_core_node_watcher services
[riak_kv, riak_pipe, riak_repl]

There is a workaround to use the second command (which is what the admin script is doing behind the scenes):

https://github.com/OpenRiak/riak/blob/nhse-develop/rel/files/riak-admin#L785-L793

So why the admin script doesn't work directly .... I don't know.

@hmmr - you've fixed problems like this before, do you know?

@martinsumner
Copy link

services)
        if [ $# -ne 1 ]; then
            echo "Usage: $SCRIPT $1"
            echo ""
            echo "Lists the services available on the node. See also: wait-for-service"
            exit 1
        fi
        
        SERVICES=`"${PLATFORM_BIN_DIR}/riak" rpc riak_core_node_watcher services || :`
        echo $SERVICES
        ;;

This works - but why is this necessary?

I assume I'm missing something obvious.

@hmmr
Copy link

hmmr commented Nov 2, 2024

There appears to be an issue with passing arguments to rpc, to deal with which there was an alternative version of rpc: https://github.com/OpenRiak/riak/blob/nhse-develop/rel/files/lib.sh#L28-L32.

All in all, replacing rpc with rpc_raw in the call to rpc riak_core_node_watcher services should be sufficient.

@hmmr
Copy link

hmmr commented Nov 2, 2024

Here's a PR: #11 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants