8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0089-glusterd-gNFS-On-post-upgrade-to-3.2-disable-gNFS-fo.patch 4.04 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From 8ba7e04362019ea2d0e80e67eb214d53dca58774 Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <[email protected]>
Date: Thu, 17 Nov 2016 12:44:38 +0530
Subject: [PATCH 089/124] glusterd/gNFS : On post upgrade to 3.2, disable gNFS
for all volumes
Currently on 3.2 gNFS is dsiabled for newly created volumes or old volumes
with default value. There will be volumes which have explicitly turn off
nfs.disable option. This change disable gNFS even for that volume as well.
label : DOWNSTREAM ONLY
Change-Id: I4ddeb23690271034b0bbb3fc50b359350b5eae87
Signed-off-by: Jiffin Tony Thottan <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/90425
Reviewed-by: Atin Mukherjee <[email protected]>
Tested-by: Atin Mukherjee <[email protected]>
Signed-off-by: Jiffin Tony Thottan <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/167573
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Soumya Koduri <[email protected]>
---
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 43 ++++++++++++++++++------------
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 10e2d48..06ea8cf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2501,26 +2501,35 @@ glusterd_update_volumes_dict(glusterd_volinfo_t *volinfo)
GF_VALIDATE_OR_GOTO(this->name, conf, out);
/* 3.9.0 onwards gNFS will be disabled by default. In case of an upgrade
- * from anything below than 3.9.0 to 3.9.x the volume's dictionary will
- * not have 'nfs.disable' key set which means the same will not be set
- * to on until explicitly done. setnfs.disable to 'on' at op-version
- * bump up flow is the ideal way here. The same is also applicable for
- * transport.address-family where if the transport type is set to tcp
- * then transport.address-family is defaulted to 'inet'.
+ * from anything below than 3.9.0 to 3.9.x, the value for nfs.disable is
+ * set to 'on' for all volumes even if it is explicitly set to 'off' in
+ * previous version. This change is only applicable to downstream code.
+ * Setting nfs.disable to 'on' at op-version bump up flow is the ideal
+ * way here. The same is also applicable for transport.address-family
+ * where if the transport type is set to tcp then transport.address-family
+ * is defaulted to 'inet'.
*/
if (conf->op_version >= GD_OP_VERSION_3_9_0) {
- if (dict_get_str_boolean(volinfo->dict, NFS_DISABLE_MAP_KEY, 1)) {
- ret = dict_set_dynstr_with_alloc(volinfo->dict, NFS_DISABLE_MAP_KEY,
- "on");
- if (ret) {
- gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_SET_FAILED,
- "Failed to set "
- "option ' NFS_DISABLE_MAP_KEY ' on "
- "volume %s",
- volinfo->volname);
- goto out;
- }
+ if (!(dict_get_str_boolean(volinfo->dict, NFS_DISABLE_MAP_KEY, 0))) {
+ gf_msg(this->name, GF_LOG_INFO, 0, 0,
+ "Gluster NFS is"
+ " being deprecated in favor of NFS-Ganesha, "
+ "hence setting nfs.disable to 'on' for volume "
+ "%s. Please re-enable it if requires",
+ volinfo->volname);
+ }
+
+ ret = dict_set_dynstr_with_alloc(volinfo->dict, NFS_DISABLE_MAP_KEY,
+ "on");
+ if (ret) {
+ gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_SET_FAILED,
+ "Failed to set "
+ "option ' NFS_DISABLE_MAP_KEY ' on "
+ "volume %s",
+ volinfo->volname);
+ goto out;
}
+
ret = dict_get_strn(volinfo->dict, "transport.address-family",
SLEN("transport.address-family"),
&address_family_str);
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助