summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorMeghana M <mmadhusu@redhat.com>2015-06-15 08:43:44 +0000
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-06-18 10:24:42 -0700
commit0e358fa5f7190f84574824b5629835abf32823a3 (patch)
tree74c25cf8d1d0cfb4ff997f46af50d83d779e0089 /xlators/mgmt
parentb7e28c76bc6e34284e54507348c57bda0c32f433 (diff)
NFS-Ganesha: Automatically export vol that was exported before vol restart
Consider a volume that is exported via NFS-Ganesha. Stopping this volume will automatically unexport the volume. Starting this volume should automatically export it. Although the logic was already there, there was a bug in it. Fixing the same by introducing a hook script. Also with the new CLI options, the hook script S31ganesha-set.sh is no longer required. Hence, removing the same. Adding a comment to tell the user that one of the CLI commands will take a few minutes to complete. This is a backport of the patch merged on master, http://review.gluster.org/#/c/11247/ Change-Id: I1c16a978b9e2093a4298ea3024d031fd1a5bb577 BUG: 1232335 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11259 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c14
2 files changed, 4 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index 40a74cd81c2..df2dd6d653e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -511,9 +511,10 @@ ganesha_manage_export (dict_t *dict, char *value, char **op_errstr)
goto out;
}
}
+
+ vol_opts = volinfo->dict;
/* cache-invalidation should be on when a volume is exported
* and off when a volume is unexported. */
- vol_opts = volinfo->dict;
ret = dict_set_dynstr_with_alloc (vol_opts,
"features.cache-invalidation", value);
if (ret)
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 1d29d50e13e..017193fcc53 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -1510,7 +1510,7 @@ glusterd_op_stage_stop_volume (dict_t *dict, char **op_errstr)
if (ret) {
ret = ganesha_manage_export(dict, "off", op_errstr);
if (ret) {
- gf_log (THIS->name, GF_LOG_WARNING, "Could not"
+ gf_log (THIS->name, GF_LOG_WARNING, "Could not "
"unexport volume via NFS-Ganesha");
ret = 0;
}
@@ -2322,17 +2322,7 @@ glusterd_op_start_volume (dict_t *dict, char **op_errstr)
if (ret)
goto out;
}
- /* Check if the volume is exported via NFS-Ganesha, if yes
- * export it as part of starting the volume */
- ret = glusterd_check_ganesha_export (volinfo);
- if (ret) {
- ret = ganesha_manage_export (dict, "on", op_errstr);
- if (ret) {
- gf_log ("", GF_LOG_WARNING, "NFS-Ganesha couldn't"
- "export the volume. %s", *op_errstr);
- ret = 0;
- }
- }
+
ret = glusterd_svcs_manager (volinfo);
out: