Skip to content

Use default timeout and retransmission values for the NFS mount.#6019

Merged
nvazquez merged 1 commit into
apache:mainfrom
CLDIN:kvm-nfs-ount-timeout
Mar 2, 2022
Merged

Use default timeout and retransmission values for the NFS mount.#6019
nvazquez merged 1 commit into
apache:mainfrom
CLDIN:kvm-nfs-ount-timeout

Conversation

@GabrielBrascher

@GabrielBrascher GabrielBrascher commented Feb 21, 2022

Copy link
Copy Markdown
Member

Description

When an NFS primary storage pool is created, Libvirt mounts the pool with the default NFS configurations (that can be customized by ADMINS via /etc/nfsmount.conf)

This would be a typical mounted NFS pool:

~# mount -v | grep <pool_path>
<pool_addr>:/<pool_path> on /mnt/a58cd909-77b7-3c48-b355-f9aeddf1a215 type nfs4 (rw,nosuid,nodev,noexec,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<clientAddress>,local_lock=none,addr=<pool_addr>)

However, in case the pool is umounted (for whatever reason) kvmheartbeat.sh remounts with timeo=133 and retrans=10:

~# mount -v | grep <pool_path>
<pool_addr>:/<pool_path> on /mnt/a58cd909-77b7-3c48-b355-f9aeddf1a215 type nfs4 (rw,relatime,sync,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,proto=tcp,timeo=133,retrans=10,sec=sys,clientaddr=<clientAddress>,local_lock=none,a
ddr=<pool_addr>)

This PR aims at removing the hard-coded values to make sure that kvmheartbeat.sh "re-mounts" the partitions accordingly to the expected parameters.

Note that if one wants to have a different timeout than the default of 600, it would be possible to achieve it by setting config: /etc/nfsmount.conf

[ NFSMount_Global_Options ]
timeo=1800

With this PR, then it would work fine either with the Libvirt mount and kvmheartbeat.sh "re-mount".

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. umount primary storage
  2. wait for kvmheartbeat.sh to mount it back
  3. check that there is no longer the hardcoded parameters and the pool NFS timeout and retransmission values respect the default value (or the one set by ADMINs)

This also allows the mount command to apply NFS mount custom values set by ADMINS via '/etc/nfsmount.conf'.
@GabrielBrascher GabrielBrascher added this to the 4.17.0.0 milestone Feb 21, 2022
@GabrielBrascher GabrielBrascher self-assigned this Feb 21, 2022

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@nvazquez nvazquez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2674

@nvazquez

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3406)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33946 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6019-t3406-kvm-centos7.zip
Smoke tests completed. 91 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 310.50 test_vpc_redundant.py

@GutoVeronezi GutoVeronezi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nvazquez nvazquez merged commit b4db3db into apache:main Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants