summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index de3045ffde3..3c3e6e01d8e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -1506,6 +1506,15 @@ glusterd_op_stage_stop_volume (dict_t *dict, char **op_errstr)
ret = -1;
goto out;
}
+ ret = glusterd_check_ganesha_export (volinfo);
+ if (ret) {
+ ret = ganesha_manage_export(dict, "off", op_errstr);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_WARNING, "Could not"
+ "unexport volume via NFS-Ganesha");
+ ret = 0;
+ }
+ }
if (glusterd_is_rb_ongoing (volinfo)) {
snprintf (msg, sizeof (msg), "Replace brick is in progress on "
@@ -2331,7 +2340,17 @@ 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: