basho / riak_test

I'm in your cluster, testing your riaks
http://basho.github.com/riak_test/
70 stars 72 forks source link

Add location tests #1353

Closed systream closed 3 years ago

martinsumner commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.