def handle_manual_failover(node, snapshots)
      # no-op if node to be failed over is already master
      return if @master == node
      logger.info("Handling manual failover")

      # ensure we can talk to the node
      node.ping

      # make current master a slave, and promote new master
      @slaves << @master if @master
      @slaves.delete(node)
      promote_new_master(snapshots, node)
    end
def handle_manual_failover(node, snapshots)
      # no-op if node to be failed over is already master
      return if @master == node
      logger.info("Handling manual failover")

      # ensure we can talk to the node
      node.ping

      # make current master a slave, and promote new master
      @slaves << @master if @master
      @slaves.delete(node)
      promote_new_master(snapshots, node)
    end
Handles a manual failover request to the given node.

 @param [Node] node the candidate node for failover
 @param [Hash<Node, NodeSnapshot>] snapshots the current set of snapshots