Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为除docker外使用golang写的程序的systemd service设置SIGPIPE后强制重启服务 #631

Closed
gj19910723 opened this issue Jul 13, 2019 · 2 comments

Comments

@gj19910723
Copy link
Contributor

起因是我们重启了systemd-journald,然而发现了kubelet挂掉了,而且systemd没有重启kubelet。
最后查阅了一些资料,貌似是golang引起的问题,docker忽略了SIGPIPE信号,但是k8s没有这样处理,观察下来kubelet特别容易挂,其他k8s的组件包括etcd也存在这个问题
kubernetes/kubernetes#38028

建议在service中添加RestartForceExitStatus=SIGPIPE,能让SIGPIPE导致kubelet进程死掉后systemd能继续重启这些进程。
awslabs/amazon-eks-ami#137

@gjmzj
Copy link
Collaborator

gjmzj commented Jul 13, 2019

之前我也发现centos下不能重启 systemd-journald;而在 ubuntu 1604 可以重启 systemd-journald 不影响;
感谢@gj19910723 深入跟踪了这个问题,我参考下,看看能否优化这些配置

@gjmzj
Copy link
Collaborator

gjmzj commented Jul 19, 2019

我参考了相关内容,现已把所有kube相关服务service改成了Restart=always

gjmzj added a commit that referenced this issue Jul 19, 2019
@gjmzj gjmzj closed this as completed Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants