Skip to content

Commit

Permalink
Add TERM signal trap to Redis-ha fix-split-brain.sh to prevent infini…
Browse files Browse the repository at this point in the history
…te loop and gracefully exit (#271)

When a pod is deleted by commandline or the whole cluster is going down via helm uninstall command fix-split-brain.sh container will not gracefully exit and goes into an infinite loop and will not be stopped until terminationGracePeriodSeconds timeouts. In this commit a TERM signal trap is added to prevent such a infinite loop and gracefully exit fix-split-brain.sh

Signed-off-by: Seyyed Mojtaba Rezvani <[email protected]>
  • Loading branch information
seyyedmojtabarezvani authored Apr 6, 2024
1 parent c68ace7 commit 31c5da8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/redis-ha/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- redis
- keyvalue
- database
version: 4.26.1
version: 4.26.2
appVersion: 7.2.4
description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
Expand Down
1 change: 1 addition & 0 deletions charts/redis-ha/templates/_configs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@
identify_announce_ip
done

trap "exit 0" TERM
while true; do
sleep {{ .Values.splitBrainDetection.interval }}

Expand Down

0 comments on commit 31c5da8

Please sign in to comment.