f6d5c04b79
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2084108 autofs can take 5 seconds or more to automount file systems in some cases. This is caused by the server probe logic attempting to connect to a server when it isn't available. Attempting to fix this problem introduced a regression where rpcbind was being consulted in a case where it shouldn't have been. This MR resolves these problems. Note that for NFSv4 mounts, if rpcbind is to be avoided then fallback to NFSv3 must be disabled. This has historically been done by using the "fstype=nfs4" automount option to requiest a specific nfs version. Resolves: rhbz#2084108 Signed-off-by: Ian Kent ikent@redhat.com
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
autofs-5.1.7 - also require TCP_REQUESTED when setting NFS port
|
|
|
|
From: Ian Kent <raven@themaw.net>
|
|
|
|
Set the NFS service port to the default (2049) only if tcp protocol is
|
|
being used and not alternate port has been given.
|
|
|
|
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
---
|
|
CHANGELOG | 1 +
|
|
modules/replicated.c | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- autofs-5.1.7.orig/CHANGELOG
|
|
+++ autofs-5.1.7/CHANGELOG
|
|
@@ -98,6 +98,7 @@
|
|
- fix handling of incorrect return from umount_ent().
|
|
- make NFS version check flags consistent.
|
|
- refactor get_nfs_info().
|
|
+- also require TCP_REQUESTED when setting NFS port.
|
|
|
|
25/01/2021 autofs-5.1.7
|
|
- make bind mounts propagation slave by default.
|
|
--- autofs-5.1.7.orig/modules/replicated.c
|
|
+++ autofs-5.1.7/modules/replicated.c
|
|
@@ -291,7 +291,7 @@ static unsigned int get_nfs_info(unsigne
|
|
|
|
rpc_info->proto = proto;
|
|
if (port < 0) {
|
|
- if (version & NFS4_REQUESTED)
|
|
+ if ((version & NFS4_REQUESTED) && (version & TCP_REQUESTED))
|
|
rpc_info->port = NFS_PORT;
|
|
else
|
|
port = 0;
|