apache / apache/iotdb

[Bug] Docker signal handling not working

Abierto
#13,498 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
6.4k
Forks
1.2k
Merge medio
1 d 23 h
PR fusionados (30 d)
115

Descripción

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/iotdb/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!

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by reading entrypoint.sh, especially the exec usage and the on_stop function. Run the standalone Docker image and stop the container to reproduce the signal-handling behavior. Done means stopping the container invokes on_stop and performs the expected graceful shutdown with FLUSH.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, shell
Área
devops, infrastructure
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.