Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dandydev/redis-ha] Add TERM signal trap to Redis-ha fix-split-brain.sh to prevent infinite loop and gracefully exit #271

Conversation

seyyedmojtabarezvani
Copy link
Contributor

@seyyedmojtabarezvani seyyedmojtabarezvani commented Apr 3, 2024

What this PR does / why we need it:

When

  • A restart occurs for a redis pod
  • Some modification (like resource increase) occurs
  • draining a node

The 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

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

…te loop and gracefully exit

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]>
Copy link
Owner

@DandyDeveloper DandyDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@DandyDeveloper DandyDeveloper merged commit 31c5da8 into DandyDeveloper:master Apr 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants