diff options
author | krishna <krishna@gluster.com> | 2011-08-17 12:22:49 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-18 05:12:49 -0700 |
commit | 6073fc29bf79fad0b0a3ae423d637ded39a00a3a (patch) | |
tree | af3efa286ccf08ebe3783161fa288349dc1bea94 /xlators/nfs | |
parent | d41eda762e4e98d95d3c80dd849a11e6aec11b56 (diff) |
do rpcsvc_init() after we fill nfs_state structure and add to nfsx->options keys for allowing insecure client ports.v3.3.0qa3
Change-Id: Iae755d1460f2c7296fc7980b5257afcf778e7767
BUG: 3296
Reviewed-on: http://review.gluster.com/247
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 3527d6ccffb..50c1bc4c2bd 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -497,14 +497,6 @@ nfs_init_state (xlator_t *this) return NULL; } - /* RPC service needs to be started before NFS versions can be - * inited. */ - nfs->rpcsvc = rpcsvc_init (this, this->ctx, this->options); - if (!nfs->rpcsvc) { - gf_log (GF_NFS, GF_LOG_ERROR, "RPC service init failed"); - goto free_nfs; - } - nfs->memfactor = GF_NFS_DEFAULT_MEMFACTOR; if (dict_get (this->options, "nfs.mem-factor")) { ret = dict_get_str (this->options, "nfs.mem-factor", @@ -653,14 +645,14 @@ nfs_init_state (xlator_t *this) if (nfs->allow_insecure) { /* blindly set both the options */ - dict_del(this->options, "rpc-auth-allow-insecure"); + dict_del (this->options, "rpc-auth-allow-insecure"); ret = dict_set_str (this->options, "rpc-auth-allow-insecure", "on"); if (ret == -1) { gf_log (GF_NFS, GF_LOG_ERROR, "dict_set_str error"); goto free_foppool; } - dict_del(this->options, "rpc-auth.ports.insecure"); + dict_del (this->options, "rpc-auth.ports.insecure"); ret = dict_set_str (this->options, "rpc-auth.ports.insecure", "on"); if (ret == -1) { @@ -668,6 +660,14 @@ nfs_init_state (xlator_t *this) goto free_foppool; } } + + nfs->rpcsvc = rpcsvc_init (this, this->ctx, this->options); + if (!nfs->rpcsvc) { + ret = -1; + gf_log (GF_NFS, GF_LOG_ERROR, "RPC service init failed"); + goto free_foppool; + } + this->private = (void *)nfs; INIT_LIST_HEAD (&nfs->versions); @@ -680,7 +680,6 @@ free_foppool: free_rpcsvc: /* * rpcsvc_deinit */ -free_nfs: if (ret < 0) { GF_FREE (nfs); nfs = NULL; |