|
|
a3470f |
From 80810495522f2e0f484c2b593d66318e34bfabb9 Mon Sep 17 00:00:00 2001
|
|
|
a3470f |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
a3470f |
Date: Wed, 14 Mar 2018 12:01:30 +0530
|
|
|
a3470f |
Subject: [PATCH 197/201] glusterd/ganesha : create/remove export file only
|
|
|
a3470f |
from the node which performs ganesha.enable
|
|
|
a3470f |
|
|
|
a3470f |
As part of volume set ganesha.enable on the ganesha export configuration file will be created/removed
|
|
|
a3470f |
using "create-export-ganesha.sh". This performed from the nodes which are part of ganesha cluster.
|
|
|
a3470f |
But it is not need since the file is saved in shared storage and consumed by the nodes in the ganesha cluster.
|
|
|
a3470f |
|
|
|
a3470f |
Label: BACKPORT FROM UPSTREAM 3.10
|
|
|
a3470f |
|
|
|
a3470f |
Upstream Reference :
|
|
|
a3470f |
>patch link : https://review.gluster.org/#/c/19716/
|
|
|
a3470f |
>Change-Id: I2583899972b47d451a90711940293004a3af4690
|
|
|
a3470f |
>BUG: 1555195
|
|
|
a3470f |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
a3470f |
|
|
|
a3470f |
Change-Id: I2583899972b47d451a90711940293004a3af4690
|
|
|
a3470f |
BUG: 1551186
|
|
|
a3470f |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
a3470f |
Reviewed-on: https://code.engineering.redhat.com/gerrit/133592
|
|
|
a3470f |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
a3470f |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
a3470f |
---
|
|
|
a3470f |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 2 +-
|
|
|
a3470f |
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 +-
|
|
|
a3470f |
xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 2 +-
|
|
|
a3470f |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
a3470f |
|
|
|
a3470f |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
a3470f |
index 7ba25ee..b130d5e 100644
|
|
|
a3470f |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
a3470f |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
a3470f |
@@ -543,7 +543,7 @@ ganesha_manage_export (dict_t *dict, char *value,
|
|
|
a3470f |
* Create the export file from the node where ganesha.enable "on"
|
|
|
a3470f |
* is executed
|
|
|
a3470f |
* */
|
|
|
a3470f |
- if (option) {
|
|
|
a3470f |
+ if (option && is_origin_glusterd (dict)) {
|
|
|
a3470f |
ret = manage_export_config (volname, "on", op_errstr);
|
|
|
a3470f |
if (ret) {
|
|
|
a3470f |
gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
a3470f |
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
a3470f |
index 0a21e02..a02a0b3 100644
|
|
|
a3470f |
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
a3470f |
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
a3470f |
@@ -2364,7 +2364,7 @@ glusterd_op_reset_volume (dict_t *dict, char **op_rspstr)
|
|
|
a3470f |
}
|
|
|
a3470f |
|
|
|
a3470f |
if (!strcmp(key, "ganesha.enable") || !strcmp (key, "all")) {
|
|
|
a3470f |
- if (glusterd_check_ganesha_export (volinfo)) {
|
|
|
a3470f |
+ if (glusterd_check_ganesha_export (volinfo) && is_origin_glusterd (dict)) {
|
|
|
a3470f |
ret = manage_export_config (volname, "off", op_rspstr);
|
|
|
a3470f |
if (ret)
|
|
|
a3470f |
gf_msg (this->name, GF_LOG_WARNING, 0,
|
|
|
a3470f |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
a3470f |
index 414f9ba..e34d58a 100644
|
|
|
a3470f |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
a3470f |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
a3470f |
@@ -2858,7 +2858,7 @@ glusterd_op_delete_volume (dict_t *dict)
|
|
|
a3470f |
volname);
|
|
|
a3470f |
goto out;
|
|
|
a3470f |
}
|
|
|
a3470f |
- if (glusterd_check_ganesha_export (volinfo)) {
|
|
|
a3470f |
+ if (glusterd_check_ganesha_export (volinfo) && is_origin_glusterd (dict)) {
|
|
|
a3470f |
ret = manage_export_config (volname, "off", NULL);
|
|
|
a3470f |
if (ret)
|
|
|
a3470f |
gf_msg (this->name, GF_LOG_WARNING, 0, 0,
|
|
|
a3470f |
--
|
|
|
a3470f |
1.8.3.1
|
|
|
a3470f |
|