ryanlecompte / redis_failover

redis_failover is a ZooKeeper-based automatic master/slave failover solution for Ruby.
http://github.com/ryanlecompte/redis_failover
MIT License
539 stars 65 forks source link

Allow Manual Failover in cluster bootstrap #67

Open arohter opened 10 years ago

arohter commented 10 years ago

When launching fresh clusters, when zk holds no 'nodes' data, and all redis nodes are in master state, client.manual_failover() will fail with an exception due to the build_client() call failing to find the 'nodes' data when initializing the client object.

At the moment we need to manually issue slaveof commands to redis nodes in order to bootstrap.

We should be able to just call a static class method (skipping build_clients) to force a bootstrap.