Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
autofs.conf: Set mount_nfs_default_protocol = 4
From autofs.conf(5): mount_nfs_default_protocol Specify the default protocol used by mount.nfs(8) (program default 3). Since we can't identify this default automatically we need to set it in the autofs configuration. Our mount.fs defaults to nfs4, so configure this correctly. Background: autmount tries to avoid to call mount.nfs for a host, when the host or the nfs service on the host is not available to avoid long timeouts (and possibly use a alternative ip-address or server). So it uses rpc calls to the null procedure of the relevant nfs version. If a map entries specifies a version option for nfs, then it is clear, what this relevant version is. But if no version is specified in the map entry, automounts wants to poll the version(s) mount.nfs would use, if no version is specified. Per default, it is assumed, that mount.nfs tries nfs3 and 2, so this is what gets polled. As we only offer nfs4, we get the error `mount(nfs): no hosts available`. We need to tell automount, that our mount.nfs defaults to nfs4 so that nfs4 is polled. The above error doesn't occur with our current version of nfs-utils (which is 2.4.1). In this version, `mount.nfs` is so old, that it doesn't show its version number when called as `mount.nfs -V`. In that case, autofs skips the probing of nfs-versions alltogether. However, when nfs-utils is upgraded to 2.5.4, autofs will detect that and we get the error. So the change here is a prerequisite for an update of nfs-utils. This new setting is valid for autofs version 5.1.3 and for autofs version 5.1.7, so there is no issue with the concurrently ongoing update of autofs.
- Loading branch information