summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2018-03-14 12:01:30 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-03-16 13:35:58 +0000
commit616c5bf733e64df0f9f6822180d62418688cfc1c (patch)
tree4f4d89440f2d5823ffd997c4f5cd1855ffdeeafe
parent0baf7f7cd47f24021d55da1eaecc19c88c275f3a (diff)
glusterd/ganesha : create/remove export file only from the node which performs ganesha.enable
As part of volume set ganesha.enable on the ganesha export configuration file will be created/removed using "create-export-ganesha.sh". This performed from the nodes which are part of ganesha cluster. But it is not need since the file is saved in shared storage and consumed by the nodes in the ganesha cluster. Change-Id: I2583899972b47d451a90711940293004a3af4690 BUG: 1555195 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index da1fee06665..b4410707cf9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -543,7 +543,7 @@ ganesha_manage_export (dict_t *dict, char *value,
* Create the export file from the node where ganesha.enable "on"
* is executed
* */
- if (option) {
+ if (option && is_origin_glusterd (dict)) {
ret = manage_export_config (volname, "on", op_errstr);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 007a6d83698..774348fe565 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2233,7 +2233,7 @@ glusterd_op_reset_volume (dict_t *dict, char **op_rspstr)
}
if (!strcmp(key, "ganesha.enable") || !strcmp (key, "all")) {
- if (glusterd_check_ganesha_export (volinfo)) {
+ if (glusterd_check_ganesha_export (volinfo) && is_origin_glusterd (dict)) {
ret = manage_export_config (volname, "off", op_rspstr);
if (ret)
gf_msg (this->name, GF_LOG_WARNING, 0,
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 2fbd545304c..926869a0235 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -2796,7 +2796,7 @@ glusterd_op_delete_volume (dict_t *dict)
goto out;
}
- if (glusterd_check_ganesha_export (volinfo)) {
+ if (glusterd_check_ganesha_export (volinfo) && is_origin_glusterd (dict)) {
ret = manage_export_config (volname, "off", NULL);
if (ret)
gf_msg (this->name, GF_LOG_WARNING, 0, 0,