From: Shehjar Tikoo <shehjart@gluster.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: Expected response from server not supporting v4
Date: Wed, 17 Aug 2011 12:05:32 +0530 [thread overview]
Message-ID: <4E4B6134.7000903@gluster.com> (raw)
In-Reply-To: <4E4A67AE.8040305@RedHat.com>
Steve Dickson wrote:
>
> On 08/16/2011 04:01 AM, Shehjar Tikoo wrote:
>> Hi All
>>
>> The following thread discusses the behaviour when the client does not support v4:
>> http://thread.gmane.org/gmane.linux.nfs/36928/
>>
>> OTOH, when the server does not support v4, for eg. Gluster NFS server, where we support only v3, I believe v4 client will attempt to connect directly to port 2049 and receive connection failure errors on TCP. Does the current nfs client handle the situation where this results in a timeout for mount? We're hearing a report of a timeout occurring on the RHEL6 client because the server does not have v4 support. Could someone please shed some light on how this behaviour is handled at present? Thanks
> Here is the current logic as to what will cause a fall back:
>
> switch (errno) {
> case EPROTONOSUPPORT:
> /* A clear indication that the server or our
> * client does not support NFS version 4. */
> goto fall_back;
> case ENOENT:
> /* Legacy Linux servers don't export an NFS
> * version 4 pseudoroot. */
> goto fall_back;
> case EPERM:
> /* Linux servers prior to 2.6.25 may return
> * EPERM when NFS version 4 is not supported. */
> goto fall_back;
> default:
> return result;
> }
>
> fall_back:
> return nfs_try_mount_v3v2(mi);
>
> So in the case of the Gluster server, you are dropping into the
> default case which is causing the time out.
>
> In the above patch set, Mi patches the mount code
> to fall back on EINVAL which is the current return value from
> the kernel, when v4 is not configured. I'm not totally
> against doing something like this, but this is very touchy
> code since it could have negative effects on other legacy
> servers.
>
> So I'm thinking Mi's kernel patch that cause the kernel
> to return EPROTONOSUPPORT, which is the correct return
> value, is probably the better way to go...
>
Thanks Steve. My understanding is that Mi's patch is to handle the case
where the client does not support v4. Do you think the same patch will also
handle a server that does not support v4 and hence prevents a client from
connecting to 2049?
Thanks
-Shehjar
> With that said, to get this type of functionality into
> already released distros, maybe the mount patch should be
> looked into since it much easier to back port and people
> are more will to take nfs-utils updates than kernel updates...
>
> So, if by chance, a well place bz is opened against an
> already released distro, someone would have to make that
> call... ;-)
>
> steved.
>
>
>
next prev parent reply other threads:[~2011-08-17 6:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 8:01 Expected response from server not supporting v4 Shehjar Tikoo
2011-08-16 12:50 ` Steve Dickson
2011-08-17 6:35 ` Shehjar Tikoo [this message]
2011-08-17 15:27 ` Chuck Lever
[not found] ` <4E4E0171.6010104@gluster.com>
2011-08-19 16:09 ` Chuck Lever
2011-08-23 9:21 ` Shehjar Tikoo
2011-08-26 15:43 ` Chuck Lever
2011-08-26 20:19 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E4B6134.7000903@gluster.com \
--to=shehjart@gluster.com \
--cc=SteveD@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.