diff options
author | NeilBrown <neilb@suse.com> | 2016-12-06 10:50:06 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-12-06 11:15:29 -0500 |
commit | 6a060231b029aa6b7a0af4fa69c84603f9f663dd (patch) | |
tree | 7ff20d6b5caaeea140fd6300ad858ba61613601b /utils/gssd/context_heimdal.c | |
parent | cf73923358c47238088cbdd0bffdf1b7a4b7d0e7 (diff) | |
download | nfs-utils-6a060231b029aa6b7a0af4fa69c84603f9f663dd.tar.gz nfs-utils-6a060231b029aa6b7a0af4fa69c84603f9f663dd.tar.xz nfs-utils-6a060231b029aa6b7a0af4fa69c84603f9f663dd.zip |
mount: take history into account when assessing if an error is permanent.
When attempting an NFSv3 mount request, it is possible to catch the
server at an "awkward" moment while it is still starting up.
In these cases it is possible to get an error that would otherwise
indiciate a permanent error, but which should be considered temporary
during
the start-up window.
In particular:
ECONNREFUSED will be returned between the time the network interface
is configured, and the time that rpcbind starts
EOPNOTSUPP (representing RPC_PROGNOTREGISTERED) will be returned
between
the time that rpcbind starts and the time when nfsd registers, and
ESTALE will be returned between the time nfsd starts and when
filesystems
are exported (this windown can be removed with correct
configuration).
So these errors only deserve a relatively small timeout.
ECONNREFUSED needs a longer timeout than the others as the start-up
window is longer. As we have long treated this as a temporary error,
with no complaints, we will keep doing so for now.
So change nfs_is_permanent_error() to record the previous error
and the number of times the same error has been seen.
If ESTALE or EOPNOTSUPP is seen 3 times (over 3 seconds or more)
or ECONNREFUSED is seen 5 times (15 seconds), report a permanent
error, others assume it could be temporary.
A result of this is that if you try a UDP mount from a server which
doesn't support UDP, you get an error without a few seconds, rather
than a 2-minute timeout.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/context_heimdal.c')
0 files changed, 0 insertions, 0 deletions