summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2016-07-12 15:44:23 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-08-25 06:55:57 -0700
commit76726da0e86077a8f3a59c02a47fcf2e3994218f (patch)
tree4b63caa3e85b85fd345ade0ad4e57d7fccafdd0e /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentf013335400d033a9677797377b90b968803135f4 (diff)
glusterd/ganesha : Move ganesha-ha.conf and ganesha.conf to shared storage
Currently all the ganesha related configuration files(ganesha.conf, ganesha-ha.conf, export files, etc) is stored locally at /etc/ganesha on a every node in ganesha cluster. Usually we end up in two issues by doing so : * difficult in modifiying ganesha related conf file * diffciult to maintain consistency of conf file across ganesha cluster To tackle this, we plan to move all the ganesha configuration to shared storage. As a first step in this patch ganesha.conf and ganesha-ha.conf move to shared storage. Here actual ganesha.conf will resides in shared stoarge and symlinks will be created in /etc/ganesha when the option "gluster nfs-ganesha enable" is executed and remove those during the "disable" part. Modified prerequisites to done before running globaloption: * enable shared storage * create nfs-ganesha folder in shared storage * create ganesha.conf and ganesha-ha.conf in it More details can be found at http://review.gluster.org/#/c/15105/ Change-Id: Ifabb6c5db50061f077a03932940190af74e2ca7f BUG: 1355956 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14906 Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index a0904fb9634..bae9be872f4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1421,10 +1421,14 @@ glusterd_op_stage_reset_volume (dict_t *dict, char **op_errstr)
char *key_fixed = NULL;
glusterd_volinfo_t *volinfo = NULL;
xlator_t *this = NULL;
+ glusterd_conf_t *priv = NULL;
this = THIS;
GF_ASSERT (this);
+ priv = this->private;
+ GF_ASSERT (priv);
+
ret = dict_get_str (dict, "volname", &volname);
if (ret) {
@@ -1451,6 +1455,16 @@ glusterd_op_stage_reset_volume (dict_t *dict, char **op_errstr)
ret = glusterd_validate_volume_id (dict, volinfo);
if (ret)
goto out;
+ ret = dict_get_str_boolean (priv->opts,
+ GLUSTERD_STORE_KEY_GANESHA_GLOBAL, _gf_false);
+ if (ret) {
+ ret = stop_ganesha (op_errstr);
+ if (ret)
+ gf_msg (THIS->name, GF_LOG_WARNING, 0,
+ GD_MSG_NFS_GNS_STOP_FAIL,
+ "Could not stop NFS-Ganesha service");
+ }
+
}
ret = dict_get_str (dict, "key", &key);
@@ -2037,11 +2051,6 @@ glusterd_op_reset_all_volume_options (xlator_t *this, dict_t *dict)
gf_msg (THIS->name, GF_LOG_WARNING, errno,
GD_MSG_DICT_GET_FAILED,
"Could not tear down NFS-Ganesha cluster");
- ret = stop_ganesha (&op_errstr);
- if (ret)
- gf_msg (THIS->name, GF_LOG_WARNING, 0,
- GD_MSG_NFS_GNS_STOP_FAIL,
- "Could not stop NFS-Ganesha service");
}
ret = -1;