Skip to content

Commit

Permalink
CA-381221: Increase NFS timeouts to the expected value
Browse files Browse the repository at this point in the history
Newer kernels have more reliable NFS timeouts but they also do not
behave quite like the manpage describes regarding major timeouts with
soft TCP NFS mounts.

From experimentation and reading the code, a major timeout occurs after
min(600, (timeo/10) * (retrans + 1)) seconds.

With the current defaults, that means 40 seconds. However, the intention
with CA-302514 was to set it to 100 seconds so increase timeo and
retrans accordingly.

Signed-off-by: Ross Lagerwall <[email protected]>
  • Loading branch information
rosslagerwall authored and MarkSymsCtx committed Sep 8, 2023
1 parent 4ab0276 commit a777e29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def get_supported_nfs_versions(server):


def get_nfs_timeout(other_config):
nfs_timeout = 100
nfs_timeout = 200

if 'nfs-timeout' in other_config:
val = int(other_config['nfs-timeout'])
Expand All @@ -294,7 +294,7 @@ def get_nfs_timeout(other_config):


def get_nfs_retrans(other_config):
nfs_retrans = 3
nfs_retrans = 4

if 'nfs-retrans' in other_config:
val = int(other_config['nfs-retrans'])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ISOSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def test_attach_nfs(self, _checkmount, testHost, makedirs,
'aServer',
'/aLocation',
'tcp',
retrans=3,
timeout=100,
retrans=4,
timeout=200,
useroptions='',
nfsversion='aNfsversionChanged')

Expand Down
4 changes: 2 additions & 2 deletions tests/test_NFSSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ def test_attach(self, validate_nfsversion, check_server_tcp, _testhost,
'/aServerpath/UUID',
'tcp',
useroptions='options',
timeout=100,
timeout=200,
nfsversion='aNfsversionChanged',
retrans=3)
retrans=4)

@mock.patch('NFSSR.Lock', autospec=True)
def test_load_ipv6(self, mock_lock):
Expand Down

0 comments on commit a777e29

Please sign in to comment.