|
|
d1681e |
From 90d143d0011c15a5a334946cb628b5415825c786 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
Date: Mon, 30 Apr 2018 12:35:01 +0530
|
|
|
d1681e |
Subject: [PATCH 252/260] glusterd/ganesha : Skip non-ganesha nodes properly
|
|
|
d1681e |
for ganesha HA set up
|
|
|
d1681e |
|
|
|
d1681e |
Label: BACKPORT FROM UPSTREAM 3.10
|
|
|
d1681e |
|
|
|
d1681e |
Upstream reference:
|
|
|
d1681e |
>Patch unlink https://review.gluster.org/#/c/19949/
|
|
|
d1681e |
>Change-Id: Iff7bc3ead43e97847219c5a5cc8b967bf0967903
|
|
|
d1681e |
>BUG: 1573078
|
|
|
d1681e |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: Iff7bc3ead43e97847219c5a5cc8b967bf0967903
|
|
|
d1681e |
BUG: 1570541
|
|
|
d1681e |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/137768
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 21 ++++++++++++---------
|
|
|
d1681e |
1 file changed, 12 insertions(+), 9 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
index b130d5e..ae7485f 100644
|
|
|
d1681e |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
@@ -834,15 +834,18 @@ pre_setup (gf_boolean_t run_setup, char **op_errstr)
|
|
|
d1681e |
{
|
|
|
d1681e |
int ret = 0;
|
|
|
d1681e |
|
|
|
d1681e |
- if (check_host_list()) {
|
|
|
d1681e |
- ret = setup_cluster(run_setup);
|
|
|
d1681e |
- if (ret == -1)
|
|
|
d1681e |
- gf_asprintf (op_errstr, "Failed to set up HA "
|
|
|
d1681e |
- "config for NFS-Ganesha. "
|
|
|
d1681e |
- "Please check the log file for details");
|
|
|
d1681e |
- } else
|
|
|
d1681e |
- ret = -1;
|
|
|
d1681e |
-
|
|
|
d1681e |
+ if (run_setup) {
|
|
|
d1681e |
+ if (!check_host_list()) {
|
|
|
d1681e |
+ gf_asprintf (op_errstr, "Running nfs-ganesha setup command "
|
|
|
d1681e |
+ "from node which is not part of ganesha cluster");
|
|
|
d1681e |
+ return -1;
|
|
|
d1681e |
+ }
|
|
|
d1681e |
+ }
|
|
|
d1681e |
+ ret = setup_cluster(run_setup);
|
|
|
d1681e |
+ if (ret == -1)
|
|
|
d1681e |
+ gf_asprintf (op_errstr, "Failed to set up HA "
|
|
|
d1681e |
+ "config for NFS-Ganesha. "
|
|
|
d1681e |
+ "Please check the log file for details");
|
|
|
d1681e |
return ret;
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|