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


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to