8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0183-glusterd-svc-Stop-stale-process-using-the-glusterd_p.patch 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From fe9159ee42f0f67b01e6a495df8105ea0f66738d Mon Sep 17 00:00:00 2001
From: Mohammed Rafi KC <[email protected]>
Date: Thu, 30 May 2019 23:48:05 +0530
Subject: [PATCH 183/192] glusterd/svc: Stop stale process using the
glusterd_proc_stop
While restarting a glusterd process, when we have a stale pid
we were doing a simple kill. Instead we can use glusterd_proc_stop
Because it has more logging plus force kill in case if there is
any problem with kill signal handling.
Upstream patch: https://review.gluster.org/#/c/glusterfs/+/22791/
>Change-Id: I4a2dadc210a7a65762dd714e809899510622b7ec
>updates: bz#1710054
>Signed-off-by: Mohammed Rafi KC <[email protected]>
Change-Id: I3327528d8ebf90bbb2221265a0cf059c9359f141
BUG: 1720248
Signed-off-by: Mohammed Rafi KC <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/172290
Reviewed-by: Atin Mukherjee <[email protected]>
Tested-by: RHGS Build Bot <[email protected]>
---
xlators/mgmt/glusterd/src/glusterd-svc-helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
index 6a3ca52..a6e662f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
+++ b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
@@ -488,9 +488,9 @@ glusterd_shd_svc_mux_init(glusterd_volinfo_t *volinfo, glusterd_svc_t *svc)
if (!mux_proc) {
if (pid != -1 && sys_access(svc->proc.pidfile, R_OK) == 0) {
- /* stale pid file, unlink it. */
- kill(pid, SIGTERM);
- sys_unlink(svc->proc.pidfile);
+ /* stale pid file, stop and unlink it */
+ glusterd_proc_stop(&svc->proc, SIGTERM, PROC_STOP_FORCE);
+ glusterd_unlink_file(svc->proc.pidfile);
}
mux_proc = __gf_find_compatible_svc(GD_NODE_SHD);
}
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助