|
|
21ab4e |
From 2b03fe928d733527f734f7f11ac3e42ea04c2293 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
21ab4e |
Date: Wed, 22 Feb 2017 14:20:41 +0530
|
|
|
21ab4e |
Subject: [PATCH 400/406] glusterd/ganesha : During volume delete remove the
|
|
|
21ab4e |
ganesha export configuration file
|
|
|
21ab4e |
|
|
|
21ab4e |
Upstream reference :
|
|
|
21ab4e |
>Change-Id: I0363e7f4d7cefd3f1b3c4f91e495767ec52e230e
|
|
|
21ab4e |
>BUG: 1425723
|
|
|
21ab4e |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
21ab4e |
>Reviewed-on: https://review.gluster.org/16707
|
|
|
21ab4e |
>Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
>Reviewed-by: soumya k <skoduri@redhat.com>
|
|
|
21ab4e |
>Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
|
|
|
21ab4e |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: I0363e7f4d7cefd3f1b3c4f91e495767ec52e230e
|
|
|
21ab4e |
BUG: 1395989
|
|
|
21ab4e |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/104151
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 2 +-
|
|
|
21ab4e |
xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 8 ++++++++
|
|
|
21ab4e |
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
21ab4e |
index 79f8c6d..ae07eaa 100644
|
|
|
21ab4e |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
21ab4e |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
21ab4e |
@@ -477,7 +477,7 @@ manage_export_config (char *volname, char *value, char **op_errstr)
|
|
|
21ab4e |
CONFDIR, value, volname, NULL);
|
|
|
21ab4e |
ret = runner_run(&runner);
|
|
|
21ab4e |
|
|
|
21ab4e |
- if (ret)
|
|
|
21ab4e |
+ if (ret && !(*op_errstr))
|
|
|
21ab4e |
gf_asprintf (op_errstr, "Failed to create"
|
|
|
21ab4e |
" NFS-Ganesha export config file.");
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
21ab4e |
index 08906ba..9e45f96 100644
|
|
|
21ab4e |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
21ab4e |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
21ab4e |
@@ -2813,6 +2813,14 @@ glusterd_op_delete_volume (dict_t *dict)
|
|
|
21ab4e |
if (ret)
|
|
|
21ab4e |
goto out;
|
|
|
21ab4e |
|
|
|
21ab4e |
+ if (glusterd_check_ganesha_export (volinfo)) {
|
|
|
21ab4e |
+ ret = manage_export_config (volname, "off", NULL);
|
|
|
21ab4e |
+ if (ret)
|
|
|
21ab4e |
+ gf_msg (this->name, GF_LOG_WARNING, 0, 0,
|
|
|
21ab4e |
+ "Could not delete ganesha export conf file "
|
|
|
21ab4e |
+ "for %s", volname);
|
|
|
21ab4e |
+ }
|
|
|
21ab4e |
+
|
|
|
21ab4e |
ret = glusterd_delete_volume (volinfo);
|
|
|
21ab4e |
out:
|
|
|
21ab4e |
gf_msg_debug (this->name, 0, "returning %d", ret);
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|