Gracefully shut down intermediary container during database image builds#76
Merged
nicksantamaria merged 4 commits intomainfrom Oct 16, 2025
Merged
Conversation
nicksantamaria
commented
Oct 15, 2025
| required: true | ||
| SLACK_WEBHOOK_URL: | ||
| required: true | ||
| DB_IMAGE_MARIADB_ROOT_PASSWORD: |
Contributor
Author
There was a problem hiding this comment.
This has been added as an org secret
GROwen
previously approved these changes
Oct 15, 2025
nicksantamaria
commented
Oct 16, 2025
| run: docker stop "${{ steps.container.outputs.id }}" | ||
| - name: Gracefully shutdown the intermediary container | ||
| run: docker exec -i "${{ steps.container.outputs.id }}" mysqladmin -u root -p${{ secrets.DB_IMAGE_MARIADB_ROOT_PASSWORD }} shutdown | ||
| continue-on-error: true |
Contributor
Author
There was a problem hiding this comment.
This is needed as docker returns an exit code 137 after that command (which is expected - its a SIGKILL code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've seen occasional instances where database images are corrupted, and do not start. I believe (with no direct evidence) that this is caused by the intermediate database container being killed abruptly.
This change does a graceful shutdown of the mysql service, which hopefully ensures the datadir is not corrupted.