Skip to content

Add location tests#1353

Merged
martinsumner merged 3 commits into
basho:develop-3.0from
systream:location
Apr 29, 2021
Merged

Add location tests#1353
martinsumner merged 3 commits into
basho:develop-3.0from
systream:location

Conversation

@systream

Copy link
Copy Markdown

No description provided.

@martinsumner

Copy link
Copy Markdown

Apologies, I'm struggling to get this to work - but I suspect I'm just doing something stupid.

I've built riak with your version of riak_core:

dev/dev1/riak/bin/riak admin status | grep riak_core
riak_core_version : <<"riak_kv-3.0.2+build.2024.ref9a9e2ed">>

However, when I try and run the riak core cluster commands - the location one isn't there:

dev/dev1/riak/bin/riak admin cluster location "rack_a"
Usage: riak-admin cluster <command>

The following commands stage changes to cluster membership. These commands
do not take effect immediately. After staging a set of changes, the staged
plan must be committed to take effect:

   join <node>                     Join node to the cluster containing <node>
   leave                           Have this node leave the cluster and shutdown
   leave <node>                    Have <node> leave the cluster and shutdown

   force-remove <node>             Remove <node> from the cluster without
                                   first handing off data. Designed for
                                   crashed, unrecoverable nodes

   replace <node1> <node2>         Have <node1> transfer all data to <node2>,
                                   and then leave the cluster and shutdown

   force-replace <node1> <node2>   Reassign all partitions owned by <node1> to
                                   <node2> without first handing off data, and
                                   remove <node1> from the cluster.

Staging commands:
   plan                            Display the staged changes to the cluster
   commit                          Commit the staged changes
   clear                           Clear the staged changes

Status and information commands:
   status                          Display a concise summary of node membership
                                   availability and ring ownership.

   partitions [--node=<node>]      Print primary, secondary and stopped
                                   partition indices and ids for the current
                                   node, or for the specified node.

   partition-count [--node=<node>] Print the cluster-wide number of
                                   partitions or the number of partitions
                                   on the specified node.

   partition id=<id>               Convert the given partition id to the
                                   matching index.

   partition index=<index>         Convert the given partition index to
                                   the matching id.

Is it just the riak_core that needs changing?

@systream

systream commented Apr 2, 2021

Copy link
Copy Markdown
Author

Sorry. You are doing everything well, I am who forget that RIAK repo should be updated too.
How does this work? I thought, after riak_core has merged, i issue another PR in RIAK with the dep upgrade and the riak-admin file update.

At rel/files/riak-admin file after line 297 this should be added:

 location)
            shift
            relx_nodetool rpc riak_core_console command $SCRIPT cluster location $@
            ;;

@martinsumner

martinsumner commented Apr 2, 2021

Copy link
Copy Markdown

Thanks. I'll make that change locally so I can run the tests. Your riak_core PR will be enough for now, there will be other PRs required for this and to point at the right riak_core tag in the chain - but I can sort that.

@martinsumner
martinsumner merged commit 48bcaf6 into basho:develop-3.0 Apr 29, 2021
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 this pull request may close these issues.

2 participants