8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0080-glusterd-ganesha-Skip-non-ganesha-nodes-properly-for.patch 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From c5c6720c5186741a3b01a5ba2b34633fc1a00fc5 Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <[email protected]>
Date: Mon, 30 Apr 2018 12:35:01 +0530
Subject: [PATCH 080/124] glusterd/ganesha : Skip non-ganesha nodes properly
for ganesha HA set up
Label: DOWNSTREAM ONLY
Upstream reference:
>Patch unlink https://review.gluster.org/#/c/19949/
>Change-Id: Iff7bc3ead43e97847219c5a5cc8b967bf0967903
>BUG: 1573078
>Signed-off-by: Jiffin Tony Thottan <[email protected]>
Change-Id: Iff7bc3ead43e97847219c5a5cc8b967bf0967903
Signed-off-by: Jiffin Tony Thottan <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/167165
Reviewed-by: Soumya Koduri <[email protected]>
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index ff36476..d882105 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -842,17 +842,20 @@ static int
pre_setup(gf_boolean_t run_setup, char **op_errstr)
{
int ret = 0;
-
- if (check_host_list()) {
- ret = setup_cluster(run_setup);
- if (ret == -1)
+ if (run_setup) {
+ if (!check_host_list()) {
gf_asprintf(op_errstr,
- "Failed to set up HA "
- "config for NFS-Ganesha. "
- "Please check the log file for details");
- } else
- ret = -1;
-
+ "Running nfs-ganesha setup command "
+ "from node which is not part of ganesha cluster");
+ return -1;
+ }
+ }
+ ret = setup_cluster(run_setup);
+ if (ret == -1)
+ gf_asprintf(op_errstr,
+ "Failed to set up HA "
+ "config for NFS-Ganesha. "
+ "Please check the log file for details");
return ret;
}
--
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

搜索帮助