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

Avoid database corruption on docker stop or docker compose stop #2611

Merged
merged 2 commits into from
May 7, 2024

Conversation

handfreezer
Copy link
Contributor

Changes in init.sh (entrypoint) of container to manage a clean stop of database on docker stop or docker compose stop

Bug

Have a look here from MariaDB JIRA: https://jira.mariadb.org/browse/MDEV-34047
=> [your container entrypoint is intentionally corrupting your database after any service start failure with "rm /var/lib/mysql/ib_logfile*" [ref]. It won't be recoverable]

Description

init.sh script will trap the SIGTERM signal sent by docker on stop, and then request a "service_mariadb stop" before touching a file to stop the main process (PID=1)

Types of changes

  • Bug fix (non-breaking change which fixes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

Changes in init.sh (entrypoint) of container to manage a clean stop of database on docker stop or docker compose stop
@zoic21 zoic21 merged commit 1d72397 into jeedom:alpha May 7, 2024
4 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.

3 participants