14f8ab
From 37bf4daca164cfcb260760ee2fd25d66f920dc7f Mon Sep 17 00:00:00 2001
14f8ab
From: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Date: Wed, 22 Feb 2017 18:26:30 +0530
14f8ab
Subject: [PATCH 064/124] glusterd/ganesha : return proper value in pre_setup()
14f8ab
14f8ab
Label: DOWNSTREAM ONLY
14f8ab
14f8ab
Change-Id: I6f7ce82488904c7d418ee078162f26f1ec81e9d9
14f8ab
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Reviewed-on: https://review.gluster.org/16733
14f8ab
Smoke: Gluster Build System <jenkins@build.gluster.org>
14f8ab
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
14f8ab
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
14f8ab
Tested-by: Raghavendra Talur <rtalur@redhat.com>
14f8ab
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
14f8ab
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
14f8ab
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/167149
14f8ab
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 xlators/mgmt/glusterd/src/glusterd-ganesha.c | 7 +++----
14f8ab
 1 file changed, 3 insertions(+), 4 deletions(-)
14f8ab
14f8ab
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
14f8ab
index 1c2ba7a..d9fdfc6 100644
14f8ab
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
14f8ab
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
14f8ab
@@ -843,16 +843,15 @@ pre_setup(gf_boolean_t run_setup, char **op_errstr)
14f8ab
 {
14f8ab
     int ret = 0;
14f8ab
 
14f8ab
-    ret = check_host_list();
14f8ab
-
14f8ab
-    if (ret) {
14f8ab
+    if (check_host_list()) {
14f8ab
         ret = setup_cluster(run_setup);
14f8ab
         if (ret == -1)
14f8ab
             gf_asprintf(op_errstr,
14f8ab
                         "Failed to set up HA "
14f8ab
                         "config for NFS-Ganesha. "
14f8ab
                         "Please check the log file for details");
14f8ab
-    }
14f8ab
+    } else
14f8ab
+        ret = -1;
14f8ab
 
14f8ab
     return ret;
14f8ab
 }
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab