Skip to content

Sentinel cannot elect the new redis master when old redis master is down #9

Open
@lmgnid

Description

@lmgnid

Hello, did a quick test and found that the new redis master cannot be elected correctly when the old redis master is down:
Here is what I did:
1: Deployed a 3 nodes redis-cluster with the compose example here
2: docker stop the current redis-master node (192.168.128.171)
3: Then found other redis-slaves are still point to the old master
4: Checked logs, it seems other redis-slaves still elect the old master as the new master:
77988:X 24 Aug 18:15:29.786 # +sdown master mymaster 192.168.128.171 6379
77988:X 24 Aug 18:15:29.844 # +odown master mymaster 192.168.128.171 6379 #quorum 2/2
77988:X 24 Aug 18:15:29.844 # +new-epoch 1
77988:X 24 Aug 18:15:29.844 # +try-failover master mymaster 192.168.128.171 6379
77988:X 24 Aug 18:15:29.845 # +vote-for-leader f5c9d950d522a745146040ddad51f8d6b5179972 1
77988:X 24 Aug 18:15:29.847 # e5f4a970e493af668f61b1cf63ba5ac608fc11fd voted for f5c9d950d522a745146040ddad51f8d6b5179972 1
77988:X 24 Aug 18:15:29.904 # +elected-leader master mymaster 192.168.128.171 6379
77988:X 24 Aug 18:15:29.904 # +failover-state-select-slave master mymaster 192.168.128.171 6379
77988:X 24 Aug 18:15:29.975 # -failover-abort-no-good-slave master mymaster 192.168.128.171 6379
77988:X 24 Aug 18:15:30.052 # Next failover delay: I will not start a failover before Thu Aug 24 18:16:30 2017
77633:S 24 Aug 18:16:01.339 # Timeout connecting to the MASTER...

So from my testing, it seems the sentinel HA doesn't work at all. Not sure what I miss? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions