-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Description
Failover not happening once master gets restarted
After enabling announce-hostnames & resolve-hostnames at first replica formation is happening without any issues.
But after master failover sentinels are not starting failover and I don't see +odown in sentinel logs which I see when running without hostnames.
To reproduce
Redis 6.2.4 on 3 pods along with sentinels on each with the below configurations.
master.conf
replica-announce-ip <DNS>
slave.conf
replica-announce-ip <SLAVE DNS>
replicaof <MASTER-DNS> <MASTER-PORT>
sentinel.conf
SENTINEL resolve-hostnames yes
SENTINEL announce-hostnames yes
sentinel parallel-syncs mymaster 1
replica-announce-ip <Sentinel DNS>
Delete master pod and force it to not start again, see failover behavior and delete new master, and observe the same.
Expected behavior
Replica should become master when master went down.
Additional information
Below are the entries in logs when hostnames enabled where i only see +sdown.
18:15:42.038 # +sdown master mymaster redis-0.redis.dev-wb.svc.cluster.local 6379
18:15:42.038 # +sdown sentinel eef584c8262dd5eaa3d8850e6932bfde80839a24 172.1.0.171 26379 @ mymaster redis-0.redis.dev-wb.svc.cluster.local 6379
Below is the log when hostnames were set to false, where I can see +odown.
+sdown sentinel 9f8616a7f32bac48b49be67c2fce7039c0d16916 172.31.16.74 26379 @ RedisMaster 172.31.16.74 6379
+sdown master RedisMaster 172.31.16.74 6379
+odown master RedisMaster 172.31.16.74 6379 #quorum 2/2
+new-epoch 3