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