Add code to remove nodes from cluster state
Merge pull request #19 from basho/ajs/ensemble_remove_node

Add code to remove nodes from cluster state
Remove dangerous access to record using element/2

It seems to incorrectly store the version when {version, views} was
desired.
Some edoc fixes

This fixes all but one error I was getting while running edoc on
riak_ensemble.
Merge pull request #25 from basho/bugfix/edoc-fixes

Some edoc fixes

Reviewed-by: reiddraper
Add ping_quorum and get_peer_info support calls

riak_ensemble_peer:ping_quorum/1 checks an ensemble for an active
quorum, returning the current ensemble leader as well as the list of
peers supporting the current quorum.

riak_ensemble_manager:get_peer_info/2 returns information about a
given ensemble peer: the peer's current FSM state, if it is or is not
trusted, and it's current epoch.
Merge pull request #26 from basho/feature/ensemble-commands

Add ping_quorum and get_peer_info support calls

Reviewed-by: engelsanchez
Centralize settings/timeouts into a single module

This commit moves all hardcoded settings/timeouts into the new
riak_ensemble_config module. This not only makes it easier to quickly
look up the various values, but is also the first step in making many
of these settings user configurable.
Make several hardcoded settings user configurable

As a first pass, we directly query configurable settings directly from
the application environment variables. In the future, we should profile
and see if the added contention against the application ETS table matters.
If so, we could consider caching settings using a approach such as the
one used by sidejob_config.
Merge pull request #28 from basho/feature/configurable

Make several hardcoded settings user configurable

Reviewed-by: reiddraper
Add handle_down/4 cb for backend behavior

Handle 'DOWN' messages in the peer and callback into the backend
handle_down/4 function.

Part of a fix for basho/riak_kv#985
only issue client ops if ensembles enabled
fix 'DOWN' message handling in peer
Merge pull request #31 from basho/optimization/only-issue-cmd-if-enabled

only issue client ops if ensembles enabled

Reviewed-by: engelsanchez
Merge pull request #33 from basho/bugfix/monitor-vnode-proxy

Add handle_down/4 cb for backend behavior

Reviewed-by: lordnull
Add ready to start backend callback

This will be used, for example, to indicate that Riak KV ensemble peers
should wait for the riak_kv service to be up before starting to avoid
some nasty races.
Merge pull request #24 from basho/refactor/should-be-record-field

Fix root ensemble initial record

Reviewed-by: andrewjstone
Merge pull request #32 from basho/feature/dont-start-peer-until-backend-ready

Add ready to start backend callback

Reviewed-by: lordnull
Save ensemble/cluster state when cluster enabled

Fixes #34 and hopefully basho/riak_kv#983
See #34 for details

Note that even when `riak_ensemble_manager:maybe_save_state/1` fails during
enable, we still want to call `riak_ensemble_manager:state_changed/1` to
ensure that we don't have inconsistent ets tables and running peers.
However, since this activation is not saved we can still send up with
the issue in basho/riak_kv#983.
Ensure activated cluster state is saved before use

In order to do this we turn `riak_ensemble_manager:activate/0` into a
pure function. We do this by removing calls to `ets:insert/2` and
returning the data to be inserted instead. The caller can then attempt
to save and sync the data. If this succeeds, then finally the call to
`ets:insert/2` is made and the state is updated along with `ok` being
returned to the client.