[Bug] Docker signal handling not working
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 6.4k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 115
Description
Search before asking
- I searched in the issues and found nothing similar.
Version
iotdb 1.3.1-standalone
Describe the bug and provide the minimal reproduce step
When stoping a docker container running the apache/iotdb:1.3.1-standalone image the SIGTERM signal handling trap is not executed leading to a non graceful shut down. This is because the entrypoint.sh script uses exec which destroys signal handlers using trap.
Furthermore, the function that should be executed at SIGTERM 'on_stop' defined in entrypoint.sh has the if statement "$start_what" != "all".` Therfore in standalone mode the corresponding graceful shutdown is not executed.
To reproduce run the docker container and then stop it.
What did you expect to see?
The on_stop function defined in entrypoint.sh is executed when the docker container is stopped providing a graceful shutdown with FLUSH.
What did you see instead?
Rapid shut down without proper SIGNAL handling and without execution of the on_stop function.
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire entrypoint.sh, en particulier l’utilisation de exec et la fonction on_stop. Exécutez l’image Docker autonome et arrêtez le conteneur pour reproduire le comportement de gestion des signaux. Le travail est considéré comme terminé lorsque l’arrêt du conteneur invoque on_stop et effectue l’arrêt gracieux attendu avec FLUSH.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, shell
- Domaine
- devops, infrastructure
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 35/100