apache / apache/incubator-seata
容器中的seata停止时,无法响应kill 15信号,导致无法走优雅停机逻辑
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
查看了一下容器中发现seata进程并不是PID 1导致的
目前做法:
- 让seata进程成为PID 1
exec方式,但是目前这种方式我试了一下,可以,但是在启动报错时,错误日志无法输出,直接就关闭了容器 - 让信号传播到seata进程
2.1 让shell脚本处理信号
2.2 使用具有传播信号的工具,tini(es是这样弄的) - 走k8s preStop方式(这种方案不推荐,感觉太依赖k8s的东西了,在docker里面一样失效)
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Just paste your stack trace here!
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- xxx
- xxx
- xxx
Minimal yet complete reproducer code (or URL to code):
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
- JDK version(e.g.
java -version): - Seata client/server version:
- Database version:
- OS(e.g.
uname -a): - Others:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Seata process shutdown in a Docker container and inspect the container startup entry point, including the shell-script, exec, and tini approaches mentioned in the issue. Done means SIGTERM (kill 15) reaches Seata, graceful shutdown runs, and startup errors remain visible in the container logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100