a3470f
From 0ae0579f3c92ecf6270eea308905518ce75efb7b Mon Sep 17 00:00:00 2001
a3470f
From: Jiffin Tony Thottan <jthottan@redhat.com>
a3470f
Date: Wed, 22 Feb 2017 18:26:30 +0530
a3470f
Subject: [PATCH 60/74] glusterd/ganesha : return proper value in pre_setup()
a3470f
a3470f
Change-Id: I6f7ce82488904c7d418ee078162f26f1ec81e9d9
a3470f
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
a3470f
Reviewed-on: https://review.gluster.org/16733
a3470f
Smoke: Gluster Build System <jenkins@build.gluster.org>
a3470f
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
a3470f
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
a3470f
Tested-by: Raghavendra Talur <rtalur@redhat.com>
a3470f
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
a3470f
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
a3470f
---
a3470f
 xlators/mgmt/glusterd/src/glusterd-ganesha.c | 7 +++----
a3470f
 1 file changed, 3 insertions(+), 4 deletions(-)
a3470f
a3470f
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
a3470f
index 5d6144a..cd591df 100644
a3470f
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
a3470f
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
a3470f
@@ -834,15 +834,14 @@ pre_setup (gf_boolean_t run_setup, char **op_errstr)
a3470f
 {
a3470f
         int    ret = 0;
a3470f
 
a3470f
-        ret = check_host_list();
a3470f
-
a3470f
-        if (ret) {
a3470f
+        if (check_host_list()) {
a3470f
                 ret = setup_cluster(run_setup);
a3470f
                 if (ret == -1)
a3470f
                         gf_asprintf (op_errstr, "Failed to set up HA "
a3470f
                                      "config for NFS-Ganesha. "
a3470f
                                      "Please check the log file for details");
a3470f
-        }
a3470f
+        } else
a3470f
+		ret = -1;
a3470f
 
a3470f
         return ret;
a3470f
 }
a3470f
-- 
a3470f
1.8.3.1
a3470f