Permalink
Browse files

Added `riak-admin cluster members`

This lets users see current cluster membership. It does exactly the
same as `riak-admin member-status` only it's in the cluster subcommand,
where I feel it should live.
  • Loading branch information...
1 parent 8b32af5 commit 29cba8f3bdbe341b45967c1a421565bfbc3fa013 @lenary committed Oct 16, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 rel/files/riak-admin
View
@@ -148,6 +148,22 @@ cluster_admin()
ensure_node_running
$NODETOOL rpc riak_core_console clear_staged
;;
+ members)
+ if [ $# -ne 1 ]; then
+ echo "Usage: $SCRIPT cluster $1"
+ exit 1
+ fi
+
+ # Make sure the local node IS running
+ RES=`$NODETOOL ping`
+ if [ "$RES" != "pong" ]; then
+ echo "Node is not running!"
+ exit 1
+ fi
+ shift
+
+ $NODETOOL rpc riak_core_console member_status $@
+ ;;
*)
echo "\
Usage: $SCRIPT cluster <command>
@@ -175,6 +191,9 @@ Staging commands:
plan Display the staged changes to the cluster
commit Commit the staged changes
clear Clear the staged changes
+
+Info commands:
+ members Display the current cluster members
"
esac
}

4 comments on commit 29cba8f

I suspect that this should actually be a riak_core_console change, if we're going to do it.

Owner

lenary replied Oct 20, 2012

How do you mean?

This changed the behavior of the controller script without changing anything in riak_core. If the riak_core behavior is inconsistent, we should make changes both places, rather than just in the script.

Owner

lenary replied Oct 25, 2012

All I did was copy the riak-admin member_status to riak-admin cluster members - I don't think there's inconsistent behaviour in riak_core itself. The script just more closely matches what's in my head for managing the cluster.

Please sign in to comment.