public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: "Seiichi Ikarashi (Fujitsu)" <s.ikarashi@fujitsu.com>,
	'Scott Mayhew' <smayhew@redhat.com>
Cc: "'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: Mon, 11 Nov 2024 11:25:04 -0600	[thread overview]
Message-ID: <2fb5df95-327d-435a-93e0-db71519ae221@redhat.com> (raw)
In-Reply-To: <OSZPR01MB77727651A22E3D89E72954DD88522@OSZPR01MB7772.jpnprd01.prod.outlook.com>



On 11/4/24 11:43 PM, 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>
Committed... (tag: nfs-utils-2-8-2-rc1)

steved.
> ---
>   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;


      parent reply	other threads:[~2024-11-11 17:25 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
2024-11-11 17:25 ` Steve Dickson [this message]

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=2fb5df95-327d-435a-93e0-db71519ae221@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=s.ikarashi@fujitsu.com \
    --cc=smayhew@redhat.com \
    --cc=sorenson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox