|
|
17b94a |
From 1e619b95e3f03e226fef135bfaeeca9b069eb978 Mon Sep 17 00:00:00 2001
|
|
|
17b94a |
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
17b94a |
Date: Wed, 14 Mar 2018 12:01:30 +0530
|
|
|
17b94a |
Subject: [PATCH 077/124] glusterd/ganesha : create/remove export file only
|
|
|
17b94a |
from the node which performs ganesha.enable
|
|
|
17b94a |
|
|
|
17b94a |
As part of volume set ganesha.enable on the ganesha export configuration file will be created/removed
|
|
|
17b94a |
using "create-export-ganesha.sh". This performed from the nodes which are part of ganesha cluster.
|
|
|
17b94a |
But it is not need since the file is saved in shared storage and consumed by the nodes in the ganesha cluster.
|
|
|
17b94a |
|
|
|
17b94a |
Label: DOWNSTREAM ONLY
|
|
|
17b94a |
|
|
|
17b94a |
Upstream Reference :
|
|
|
17b94a |
>patch link : https://review.gluster.org/#/c/19716/
|
|
|
17b94a |
>Change-Id: I2583899972b47d451a90711940293004a3af4690
|
|
|
17b94a |
>BUG: 1555195
|
|
|
17b94a |
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
17b94a |
|
|
|
17b94a |
Change-Id: I2583899972b47d451a90711940293004a3af4690
|
|
|
17b94a |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
17b94a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/167162
|
|
|
17b94a |
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
17b94a |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
17b94a |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
17b94a |
---
|
|
|
17b94a |
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 2 +-
|
|
|
17b94a |
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 3 ++-
|
|
|
17b94a |
xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 2 +-
|
|
|
17b94a |
3 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
17b94a |
|
|
|
17b94a |
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
17b94a |
index fe0bffc..ff36476 100644
|
|
|
17b94a |
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
17b94a |
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
|
|
|
17b94a |
@@ -530,7 +530,7 @@ ganesha_manage_export(dict_t *dict, char *value,
|
|
|
17b94a |
* Create the export file from the node where ganesha.enable "on"
|
|
|
17b94a |
* is executed
|
|
|
17b94a |
* */
|
|
|
17b94a |
- if (option) {
|
|
|
17b94a |
+ if (option && is_origin_glusterd(dict)) {
|
|
|
17b94a |
ret = manage_export_config(volname, "on", op_errstr);
|
|
|
17b94a |
if (ret) {
|
|
|
17b94a |
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_EXPORT_FILE_CREATE_FAIL,
|
|
|
17b94a |
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
17b94a |
index 52809a8..10e2d48 100644
|
|
|
17b94a |
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
17b94a |
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
17b94a |
@@ -2415,7 +2415,8 @@ glusterd_op_reset_volume(dict_t *dict, char **op_rspstr)
|
|
|
17b94a |
}
|
|
|
17b94a |
|
|
|
17b94a |
if (!strcmp(key, "ganesha.enable") || !strcmp(key, "all")) {
|
|
|
17b94a |
- if (glusterd_check_ganesha_export(volinfo)) {
|
|
|
17b94a |
+ if (glusterd_check_ganesha_export(volinfo) &&
|
|
|
17b94a |
+ is_origin_glusterd(dict)) {
|
|
|
17b94a |
ret = manage_export_config(volname, "off", op_rspstr);
|
|
|
17b94a |
if (ret)
|
|
|
17b94a |
gf_msg(this->name, GF_LOG_WARNING, 0, GD_MSG_NFS_GNS_RESET_FAIL,
|
|
|
17b94a |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
17b94a |
index de4eccb..1ea8ba6 100644
|
|
|
17b94a |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
17b94a |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
|
|
|
17b94a |
@@ -2936,7 +2936,7 @@ glusterd_op_delete_volume(dict_t *dict)
|
|
|
17b94a |
goto out;
|
|
|
17b94a |
}
|
|
|
17b94a |
|
|
|
17b94a |
- if (glusterd_check_ganesha_export(volinfo)) {
|
|
|
17b94a |
+ if (glusterd_check_ganesha_export(volinfo) && is_origin_glusterd(dict)) {
|
|
|
17b94a |
ret = manage_export_config(volname, "off", NULL);
|
|
|
17b94a |
if (ret)
|
|
|
17b94a |
gf_msg(this->name, GF_LOG_WARNING, 0, 0,
|
|
|
17b94a |
--
|
|
|
17b94a |
1.8.3.1
|
|
|
17b94a |
|