GabrielBrascher opened a new pull request #6019:
URL: https://github.com/apache/cloudstack/pull/6019


   ### 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 mounted (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)
   - [X] 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
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   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)
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to