From: Jeff Layton <jlayton@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] mount.nfs: try the next address after mount fails with ETIMEDOUT
Date: Thu, 31 May 2012 11:40:21 -0400 [thread overview]
Message-ID: <20120531114021.74b9a607@corrin.poochiereds.net> (raw)
In-Reply-To: <C16A9517-8334-4B2D-BFB1-D2C02AD66972@oracle.com>
On Thu, 31 May 2012 10:28:49 -0400
Chuck Lever <chuck.lever@oracle.com> wrote:
>
> On May 31, 2012, at 9:03 AM, Jeff Layton wrote:
>
> > If a NFS mount attempt fails with an ETIMEDOUT error, the mount.nfs code
> > doesn't currently attempt the next address in the list. For a NFSv4 mount
> > the initial mount() call almost always ends up going over
> > NFS_DEF_FG_TIMEOUT_MINUTES and the mount is never retried.
> >
> > For a v3 mount, it ends up continually retrying against the same IPv6
> > address, and never tries the IPv4 address. Eventually it gives up once
> > it hits the NFS_DEF_FG_TIMEOUT_MINUTES timeout.
> >
> > It's possible that a server is just unreachable via IPv6 (due to a
> > routing misconfiguration for instance), or is dropping IPv6 frames on
> > the floor. In that situation, it might still be reachable via IPv4 and
> > trying the next address could have allowed the mount to succeed.
> >
> > Fix this by treating ETIMEDOUT in a similar fashion to ECONNREFUSED.
> > Have the client try the next address in the list before giving up and
> > returning an error.
>
> Bzzzzt. AF fallback is only legal to do if the admin did not specify a netid.
>
> Can you demonstrate that your patch works correctly if an IPv6 netid is specified? "Correctly" here means that no fallback occurs.
>
If someone specifies an IPv6 netid (via proto= option) then we would
set AF_INET6 in the addrinfo "hints" and there will be no IPv4
addresses in the mi->address list. So, this does still work correctly
when someone specifies an ipv6 netid.
Chuck also pointed out on IRC that the description was a little
unclear, since it was specific to my test rig where the server had a
single IPv6 and IPv4 address in DNS.
The loop that retries against different addresses doesn't care
about whether the addrs are v4 or v6. What this really tells mount.nfs
to do is to keep trying different addresses in the list if there are
any instead of giving up on an ETIMEDOUT error.
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2012-05-31 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 13:03 [PATCH] mount.nfs: try the next address after mount fails with ETIMEDOUT Jeff Layton
2012-05-31 14:28 ` Chuck Lever
2012-05-31 15:40 ` Jeff Layton [this message]
2012-05-31 20:19 ` Chuck Lever
2012-06-19 14:58 ` Steve Dickson
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=20120531114021.74b9a607@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=chuck.lever@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).