2 Commits

Author SHA1 Message Date
Chris Dent
886aa622b0 Update sentinel support to allow multiple sentinel hosts
Multiple sentinel hosts are now allowed by listing the additional
hosts as multiple 'sentinel_fallback' parameters. These are combined
with the first sentinel host to create a list that is provided to
Sentinel class constructor.

This provides safety in the case when the first (or any other) sentinel
host goes down.

Tests are run twice: once with fallbacks, once without.

Change-Id: Ie0a134f02617e8552a87c8bcd49996daaba07f4e
2015-01-12 14:18:53 +00:00
Chris Dent
a2216e383e Add support for an optional redis-sentinel
If sentinel support is desired then the connection URI should take
the form:

   redis://<sentinel host>:<sentinel port>?sentinel=<master name>

This will be parsed to connect to a Sentinel server to discover a
master. The response will be used to make a connection to the
current master.

The setup-sentinel-env.sh script will exit with an error if either
the redis-server or sentinel cannot be found. When the script is
done it will clean up the mess it makes.

Change-Id: I205ed88c72587d9f5f916d344c44192bee2aa41a
2015-01-07 12:16:59 +01:00