|
|
d1681e |
From 1a9717eb9fb0c6ebd4fce5aa85e3ed53bdd69d59 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
Date: Wed, 22 Feb 2017 14:20:41 +0530
|
|
|
d1681e |
Subject: [PATCH 54/74] glusterd/ganesha : During volume delete remove the
|
|
|
d1681e |
ganesha export configuration file
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I0363e7f4d7cefd3f1b3c4f91e495767ec52e230e
|
|
|
d1681e |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://review.gluster.org/16707
|
|
|
d1681e |
Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
d1681e |
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
d1681e |
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
d1681e |
Reviewed-by: soumya k <skoduri@redhat.com>
|
|
|
d1681e |
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
|
|
|
d1681e |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 2 +-
|
|
|
d1681e |
xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 8 ++++++++
|
|
|
d1681e |
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
index c16dd72..e176df9 100644
|
|
|
d1681e |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
d1681e |
@@ -464,7 +464,7 @@ manage_export_config (char *volname, char *value, char **op_errstr)
|
|
|
d1681e |
CONFDIR, value, volname, NULL);
|
|
|
d1681e |
ret = runner_run(&runner);
|
|
|
d1681e |
|
|
|
d1681e |
- if (ret)
|
|
|
d1681e |
+ if (ret && !(*op_errstr))
|
|
|
d1681e |
gf_asprintf (op_errstr, "Failed to create"
|
|
|
d1681e |
" NFS-Ganesha export config file.");
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
d1681e |
index 0914fb1..92db458 100644
|
|
|
d1681e |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
d1681e |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
d1681e |
@@ -2853,6 +2853,14 @@ glusterd_op_delete_volume (dict_t *dict)
|
|
|
d1681e |
volname);
|
|
|
d1681e |
goto out;
|
|
|
d1681e |
}
|
|
|
d1681e |
+ if (glusterd_check_ganesha_export (volinfo)) {
|
|
|
d1681e |
+ ret = manage_export_config (volname, "off", NULL);
|
|
|
d1681e |
+ if (ret)
|
|
|
d1681e |
+ gf_msg (this->name, GF_LOG_WARNING, 0, 0,
|
|
|
d1681e |
+ "Could not delete ganesha export conf file "
|
|
|
d1681e |
+ "for %s", volname);
|
|
|
d1681e |
+ }
|
|
|
d1681e |
+
|
|
|
d1681e |
|
|
|
d1681e |
ret = glusterd_delete_volume (volinfo);
|
|
|
d1681e |
out:
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|