735d085bc7
If you use COPY_ALWAYS, kolla will overwrite /etc/redis/redis.conf. But Redis Sentinel will store myid in this file. So when it restart, Redis Sentinel will regenerate new myid every time. Redis Sentinel cluster will see more and more sentinel, This patch use hash value with hostname as sentinel myid. Change-Id: I6d9403231e41baac177f29c58e67ba605795385d Closes-bug: #1788179
13 lines
602 B
Django/Jinja
13 lines
602 B
Django/Jinja
{% set redis_master_address = hostvars[groups['redis'][0]]['ansible_' + hostvars[groups['redis'][0]]['api_interface']]['ipv4']['address'] %}
|
|
daemonize no
|
|
pidfile "/var/run/redis/redis-sentinel.pid"
|
|
logfile "/var/log/kolla/redis/redis-sentinel.log"
|
|
bind {{ api_interface_address }}
|
|
port {{ redis_sentinel_port }}
|
|
sentinel myid {{ inventory_hostname | hash('sha1') }}
|
|
sentinel monitor kolla {{ redis_master_address }} {{ redis_port }} 2
|
|
sentinel auth-pass kolla {{ redis_master_password }}
|
|
sentinel down-after-milliseconds kolla 5000
|
|
sentinel failover-timeout kolla 60000
|
|
sentinel parallel-syncs kolla 1
|