1 Star 0 Fork 5

maqi/glusterfs

forked from src-anolis-os/glusterfs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0060-ganesha-scripts-Stop-ganesha-process-on-all-nodes-if.patch 2.21 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From 93635333d17a03078a6bf72771445e1bd9ebdc15 Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <jthottan@redhat.com>
Date: Thu, 2 Mar 2017 12:22:30 +0530
Subject: [PATCH 060/124] ganesha/scripts : Stop ganesha process on all nodes
if cluster setup fails
During staging phase of volume option "nfs-ganesha", symlink "ganesha.conf"
will be created plus ganesha process will be started. The cluster setup
happens during commit phase of that option. So if cluster set up fails, the
ganesha process will be running on all cluster nodes.
Label: DOWNSTREAM ONLY
Change-Id: Ib2cb85364b7ef5b702acb4826ffdf8e6f31a2acd
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://review.gluster.org/16823
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/167145
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
extras/ganesha/scripts/ganesha-ha.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 7ba80b5..db3f921 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -175,6 +175,13 @@ determine_servers()
fi
}
+stop_ganesha_all()
+{
+ local serverlist=${1}
+ for node in ${serverlist} ; do
+ manage_service "stop" ${node}
+ done
+}
setup_cluster()
{
@@ -191,6 +198,8 @@ setup_cluster()
pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} --transport udpu ${servers}
if [ $? -ne 0 ]; then
logger "pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} ${servers} failed"
+ #set up failed stop all ganesha process and clean up symlinks in cluster
+ stop_ganesha_all ${servers}
exit 1;
fi
pcs cluster start --all
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/maqi77/glusterfs.git
git@gitee.com:maqi77/glusterfs.git
maqi77
glusterfs
glusterfs
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385