Skip to content

Commit

Permalink
Sentinel - support hostname resolve and annonce
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kanchuker committed Feb 22, 2025
1 parent 4c5b29a commit f8475f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea
.DS_Store
4 changes: 4 additions & 0 deletions entrypoint-sentinel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ EXTERNAL_CONFIG_FILE=${EXTERNAL_CONFIG_FILE:-"/etc/redis/external.conf.d/redis-s
DOWN_AFTER_MILLISECONDS=${DOWN_AFTER_MILLISECONDS:-30000}
PARALLEL_SYNCS=${PARALLEL_SYNCS:-1}
FAILOVER_TIMEOUT=${FAILOVER_TIMEOUT:-180000}
RESOLVE_HOSTNAMES=${RESOLVE_HOSTNAMES:-no}
ANNOUNCE_HOSTNAMES=${ANNOUNCE_HOSTNAMES:-no}


sentinel_mode_setup(){
Expand All @@ -21,6 +23,8 @@ sentinel_mode_setup(){
echo "sentinel down-after-milliseconds ${MASTER_GROUP_NAME} ${DOWN_AFTER_MILLISECONDS}"
echo "sentinel parallel-syncs ${MASTER_GROUP_NAME} ${PARALLEL_SYNCS}"
echo "sentinel failover-timeout ${MASTER_GROUP_NAME} ${FAILOVER_TIMEOUT}"
echo "SENTINEL resolve-hostnames ${RESOLVE_HOSTNAMES}"
echo "SENTINEL announce-hostnames ${ANNOUNCE_HOSTNAMES}"
if [[ -n "${MASTER_PASSWORD}" ]];then
echo "sentinel auth-pass ${MASTER_GROUP_NAME} ${MASTER_PASSWORD}"
fi
Expand Down
4 changes: 2 additions & 2 deletions sentinel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ acllog-max-len 128
# sentinel parallel-syncs mymaster 1
# sentinel failover-timeout mymaster 180000
sentinel deny-scripts-reconfig yes
SENTINEL resolve-hostnames no
SENTINEL announce-hostnames no
# SENTINEL resolve-hostnames no
# SENTINEL announce-hostnames no
# SENTINEL master-reboot-down-after-period mymaster 0

0 comments on commit f8475f9

Please sign in to comment.