basho/riak_control — pull request #119 by cmeiklejohn (2013-07-29 17:59:49+00:00)
Title: Handle incompatible records between the 1.3 and 1.4 release

I've confirmed a problem with a rolling upgrade between the 1.3 and 1.4 versions of Riak.

The root of the problem is that the node hosting Riak Control initiates a RPC request to all nodes, and pattern matches the result against a record. The format of this record changed between the 1.3 and 1.4 releases, without providing a new name for the record, so the pattern match fails.

This can occur when either:

1.) Riak Control hosted on 1.3 node makes a RPC request to a 1.4 node.
2.) Riak Control hosted on 1.4 node makes a RPC request to a 1.3 node.

Both of these scenarios trigger a badmatch exception in the riak_control_session module. This causes the Riak supervisor to restart the riak_control application, which then continues to crash when polling for the state until the node shuts down triggered by a maximum restart threshold.

This patch provides a few things:

* Use macros for record definitions moving forward.
* Make the 1.3 record the definitive ```member_info``` record, and the proposed-1.4.1 record the definitive ```member_info_v2``` record.
* When receiving an incompatible 1.4 record, display the node as incompatible.
* Suppress display of node-specific information when an incompatible node is returned.
* Fix failed low-watermark handling in node resource.

This patch ensures that a proposed-1.4.1 node can successfully run Riak Control, and talk to 1.3 and 1.4 nodes, but an earlier 1.3 node will still exhibit errors talking to a 1.4+ node.

@jonmeredith @russelldb @seancribbs @jgnewman @bsparrow435 @rzezeski