From: Scott Mayhew <smayhew@redhat.com>
To: "Seiichi Ikarashi (Fujitsu)" <s.ikarashi@fujitsu.com>
Cc: "'steved@redhat.com'" <steved@redhat.com>,
"'sorenson@redhat.com'" <sorenson@redhat.com>,
"'linux-nfs@vger.kernel.org'" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RESEND] mount.nfs: retry NFSv3 mount after NFSv4 failure in auto negotiation
Date: Tue, 5 Nov 2024 07:30:58 -0500 [thread overview]
Message-ID: <ZyoQAgWdMawSn6ze@aion> (raw)
In-Reply-To: <OSZPR01MB77727651A22E3D89E72954DD88522@OSZPR01MB7772.jpnprd01.prod.outlook.com>
On Tue, 05 Nov 2024, Seiichi Ikarashi (Fujitsu) wrote:
> The problem happens when a v3 mount fails with ETIMEDOUT after
> the v4 mount failed with EPROTONOSUPPORT, in mount auto negotiation.
> It immediately breaks from the "for" loop in nfsmount_fg()
> or nfsmount_child() due to EPROTONOSUPPORT, never doing the expected
> retries until timeout.
>
> [auto negotiation case]:
>
> It breaks immediately.
>
> # time mount.nfs -v 192.168.200.59:/exp /mnt
> mount.nfs: timeout set for Wed Oct 23 14:21:58 2024
> mount.nfs: trying text-based options 'vers=4.2,addr=192.168.200.59,clientaddr=192.168.200.187'
> mount.nfs: mount(2): Protocol not supported
> mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.200.59,clientaddr=192.168.200.187'
> mount.nfs: mount(2): Protocol not supported
> mount.nfs: trying text-based options 'vers=4,addr=192.168.200.59,clientaddr=192.168.200.187'
> mount.nfs: mount(2): Protocol not supported
> mount.nfs: trying text-based options 'addr=192.168.200.59'
> mount.nfs: prog 100003, trying vers=3, prot=6
> mount.nfs: trying 192.168.200.59 prog 100003 vers 3 prot TCP port 2049
> mount.nfs: prog 100005, trying vers=3, prot=17
> mount.nfs: trying 192.168.200.59 prog 100005 vers 3 prot UDP port 20048
> mount.nfs: portmap query retrying: RPC: Timed out
> mount.nfs: prog 100005, trying vers=3, prot=6
> mount.nfs: trying 192.168.200.59 prog 100005 vers 3 prot TCP port 20048
> mount.nfs: portmap query failed: RPC: Timed out
> mount.nfs: Protocol not supported for 192.168.200.59:/exp on /mnt
>
> real 0m13.027s
> user 0m0.002s
> sys 0m0.005s
> #
>
> [nfsvers=3 case]:
>
> It retries until exceeding timeout as expected.
>
> # time mount.nfs -v -o nfsvers=3 192.168.200.59:/exp /mnt
> mount.nfs: timeout set for Wed Oct 23 14:22:23 2024
> mount.nfs: trying text-based options 'nfsvers=3,addr=192.168.200.59'
> mount.nfs: prog 100003, trying vers=3, prot=6
> mount.nfs: trying 192.168.200.59 prog 100003 vers 3 prot TCP port 2049
> mount.nfs: prog 100005, trying vers=3, prot=17
> mount.nfs: trying 192.168.200.59 prog 100005 vers 3 prot UDP port 20048
> mount.nfs: portmap query retrying: RPC: Timed out
> mount.nfs: prog 100005, trying vers=3, prot=6
> mount.nfs: trying 192.168.200.59 prog 100005 vers 3 prot TCP port 20048
> mount.nfs: portmap query failed: RPC: Timed out
> (snip)
> mount.nfs: prog 100005, trying vers=3, prot=6
> mount.nfs: trying 192.168.200.59 prog 100005 vers 3 prot TCP port 20048
> mount.nfs: portmap query failed: RPC: Timed out
> mount.nfs: Connection timed out for 192.168.200.59:/exp on /mnt
>
> real 2m10.152s
> user 0m0.007s
> sys 0m0.015s
> #
>
>
> Let's retry in auto negotiation case, too.
>
> Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
Should probably also have Fixes: a709f25c ("mount: Report correct error in the fall_back cases.")
Reviewed-by: Scott Mayhew <smayhew@redhat.com>
> ---
> utils/mount/stropts.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index a92c420..103c41f 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -981,7 +981,7 @@ fall_back:
> if ((result = nfs_try_mount_v3v2(mi, FALSE)))
> return result;
>
> - if (errno != EBUSY && errno != EACCES)
> + if (errno != EBUSY && errno != EACCES && errno != ETIMEDOUT)
> errno = olderrno;
>
> return result;
> --
> 2.43.5
>
next prev parent reply other threads:[~2024-11-05 12:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 5:43 [PATCH RESEND] mount.nfs: retry NFSv3 mount after NFSv4 failure in auto negotiation Seiichi Ikarashi (Fujitsu)
2024-11-05 12:30 ` Scott Mayhew [this message]
2024-11-11 17:25 ` 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=ZyoQAgWdMawSn6ze@aion \
--to=smayhew@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=s.ikarashi@fujitsu.com \
--cc=sorenson@redhat.com \
--cc=steved@redhat.com \
/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.