File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 cpu : 250m
7575 memory : 500Mi
7676 command :
77- - /bin/bash
78- - -c
79- - ' container run_master_and_sentinel'
77+ - container run_master_and_sentinel
8078 environment_variables :
8179 REDIS_SENTINEL_SERVICE_HOST : ' '
8280 deployment_strategy :
@@ -181,5 +179,5 @@ tasks:
181179 image :
182180 image : quay.io/continuouspipe/redis3-highly-available:stable
183181 commands :
184- - /bin/bash -c ' container master_failover_and_sentinel_cleanup'
182+ - container master_failover_and_sentinel_cleanup
185183` ` `
Original file line number Diff line number Diff line change 22
33function sentinel_command()
44{
5- redis-cli -h redis-sentinel -p 26379 --csv SENTINEL
5+ redis-cli -h redis-sentinel -p 26379 --csv SENTINEL " $@ "
66}
77
88function get_existing_master()
@@ -49,7 +49,12 @@ function sentinel_cleanup()
4949 echo " > Waiting for the sentinel to receive data from the other sentinels"
5050 sleep 11s
5151 echo " > Resetting sentinel data for $sentinel "
52- redis-cli -h " $sentinel " -p 26379 SENTINEL RESET mymaster
52+
53+ if test_remote_ports " $sentinel :26379" ; then
54+ redis-cli -h " $sentinel " -p 26379 SENTINEL RESET mymaster
55+ else
56+ echo " > Sentinel $sentinel doesn't appear to be active any more"
57+ fi
5358 done
5459}
5560
You can’t perform that action at this time.
0 commit comments