Blob Blame History Raw
From 1623c1e9e27e01c04681b6a032844d9e5e3f605a Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <jthottan@redhat.com>
Date: Fri, 28 Apr 2017 17:27:46 +0530
Subject: [PATCH 426/426] glusterd/ganesha : perform removal of ganesha.conf on
 nodes only in ganesha cluster

Upstream reference :
>Change-Id: I864ecd9391adf80fb1fa6ad2f9891a9ce77135e7
>BUG: 1401877
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
>Reviewed-on: https://review.gluster.org/17138
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: soumya k <skoduri@redhat.com>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>

Change-Id: Icf42d996a3eb072c686c2433b188d12afdab3719
BUG: 1400816
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/105741
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 xlators/mgmt/glusterd/src/glusterd-ganesha.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index f74b784..574f4b9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -757,16 +757,17 @@ stop_ganesha (char **op_errstr) {
         int ret                 = 0;
         runner_t runner         = {0,};
 
-        runinit (&runner);
-        runner_add_args (&runner, "sh", GANESHA_PREFIX"/ganesha-ha.sh",
-                         "--setup-ganesha-conf-files", CONFDIR, "no", NULL);
-        ret =  runner_run (&runner);
-        if (ret) {
-                gf_asprintf (op_errstr, "removal of symlink ganesha.conf "
-                             "in /etc/ganesha failed");
-        }
-
         if (check_host_list ()) {
+                runinit (&runner);
+                runner_add_args (&runner, "sh", GANESHA_PREFIX"/ganesha-ha.sh",
+                                 "--setup-ganesha-conf-files", CONFDIR,
+                                 "no", NULL);
+                ret =  runner_run (&runner);
+                if (ret) {
+                        gf_asprintf (op_errstr, "removal of symlink ganesha.conf "
+                                                "in /etc/ganesha failed");
+                }
+
                 ret = manage_service ("stop");
                 if (ret)
                         gf_asprintf (op_errstr, "NFS-Ganesha service could not"
-- 
1.8.3.1