[pve-devel] [PATCH common v3 0/1] Add run_fork_with_timeout utility

Emmanuel Kasper e.kasper at proxmox.com
Thu Jun 29 14:48:11 CEST 2017


changes since v2:
 * in v3-0001-Add-run_fork_with_timeout-utility.patch
   * set writer on both pipes just after the beginning of the child process
   * use $pipe->flush() after writing to the pipe to make our intent more evident
   ( perl _exit will close the file handles but will not flush IO buffers)
 * in v3-0001-Fixes-1415-do-not-block-pvestatd-when-nfsd-is-sto.patch
   * use correct parameters order

changes since V1:
 * add a second pipe to catch die() causes in the passed sub
 * disable pending alarms until we reaped the child
 * disable signals until we reaped the child ( both to avoid Zombies)
 * rename the subroutine to run_fork_with_timeout as suggested

With patches applied, pvesm status returns the following
from a stopped nfsd server after a two second wait:

pvesm status -storage nfsbsd 
got timeout
unable to activate storage 'nfsbsd' - directory '/mnt/pve/nfsbsd' does not exist or is unreachable
nfsbsd    nfs 0               0               0               0 100.00%


Emmanuel Kasper (1):
  Add run_fork_with_timeout utility

 src/PVE/Tools.pm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

-- 
2.11.0





More information about the pve-devel mailing list