Skip to content

If ZK has an old master, redis_failover will use it even though the redis instance does not exist #55

@petelacey

Description

@petelacey

This issue may be particular to cloud environments where IP addresses are not very stable.

Somehow we managed to get into a state where ZK maintained a no-longer-in-service IP for the redis master. That is, we shutdown a redis node and brought up a whole new one, and ZK never noticed because that node also runs the redis_node_manager.

At startup, when the node manager gets this old IP from ZK it attempts to ask that Redis instance whether it is still the master. In our case, this times out. And when this happens redis_failover simply logs a warning and continues to use this old IP as master. Which basically causes all future client usage to fail. I believe this is the code in question

It would probably be better to:

  1. Check to see if IPs returned from ZK match the list of nodes provided at startup of the node manager, and expire from ZK the ones that don't. And/or....
  2. Return nil instead of master if the find_existing_master method rescues a NodeUnavailableError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions