From a4f84d786b596387aa0d659fb5cc8a933c95c01b Mon Sep 17 00:00:00 2001 From: Kaleb S KEITHLEY Date: Tue, 15 Mar 2016 06:16:31 -0400 Subject: glusterd: default value of nfs.disable, change from false to true Next step in eventual deprecation of glusterfs nfs server in favor of ganesha.nfsd. Also replace several open-coded strings with constant. Change-Id: If52f5e880191a14fd38e69b70a32b0300dd93a50 BUG: 1092414 Signed-off-by: Kaleb S KEITHLEY Reviewed-on: http://review.gluster.org/13738 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee Tested-by: Atin Mukherjee Reviewed-by: Niels de Vos --- xlators/mgmt/glusterd/src/glusterd-utils.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index b1076c835fd..807b4ecf5e6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -10484,6 +10484,26 @@ glusterd_enable_default_options (glusterd_volinfo_t *volinfo, char *option) conf = this->private; GF_ASSERT (conf); +#ifdef GD_OP_VERSION_3_8_0 + if (conf->op_version >= GD_OP_VERSION_3_8_0) { + /* nfs.disable needs to be enabled for new volumes with + * >= gluster version 3.7 (for now) 3.8 later + */ + if (!option || !strcmp (NFS_DISABLE_MAP_KEY, option)) { + 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; + } + } + } +#endif + if (conf->op_version >= GD_OP_VERSION_3_7_0) { /* Set needed volume options in volinfo->dict * For ex., -- cgit