[Bug] Docker signal handling not working
- 主要言語
- Java
- スター
- 6.4k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 115
説明
### 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!
コントリビューションガイド
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, shell
- 領域
- devops, infrastructure
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100