[pve-devel] [PATCH v3 pve-common 0/2] run_with_timeout and tcp_ping
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Aug 26 10:38:25 CEST 2015
A few more changes to tcp_ping:
After checking perl's Net::Ping implementation I realized that
Ping->port_number always overwrites Ping->service_check. Basically
tcp-pinging without a port pings to the echo port and assumes that
ECONNREFUSED means the machine is reachable, while setting a port
changes the behavior to expect a complete TCP 3-way handshake to
finish, so a refused connection is then false.
Also I had forgotten that run_with_timeout actually throws the timeout
message, so I added the missing eval{} around it.
Wolfgang Bumiller (2):
Tools::run_with_timeout improvement + hires alarm
Added PVE::Network::tcp_ping to replace Net::Ping
src/PVE/Network.pm | 29 +++++++++++++++++++++++++++++
src/PVE/Tools.pm | 15 ++++++++-------
2 files changed, 37 insertions(+), 7 deletions(-)
--
2.1.4
More information about the pve-devel
mailing list