]> git.proxmox.com Git - pve-storage.git/commitdiff
GlusterfsPlugin: replace Net::Ping with tcp_ping
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 31 Aug 2015 09:02:26 +0000 (11:02 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 31 Aug 2015 13:50:56 +0000 (15:50 +0200)
Using PVE::Network::tcp_ping on port 7 (echo) for ipv6
support.

PVE/Storage/GlusterfsPlugin.pm

index 7a8c82fbee81a9f9b2153bb18847038855675b2d..e59f1ee30fe0bcfea418187bb9021591c3c6b725 100644 (file)
@@ -5,9 +5,9 @@ use warnings;
 use IO::File;
 use File::Path;
 use PVE::Tools qw(run_command);
+use PVE::Network;
 use PVE::Storage::Plugin;
 use PVE::JSONSchema qw(get_standard_option);
-use Net::Ping;
 
 use base qw(PVE::Storage::Plugin);
 
@@ -39,8 +39,8 @@ my $get_active_server = sub {
 
        if ($server && $server ne 'localhost' && $server ne '127.0.0.1' && $server ne '::1') {
 
-           my $p = Net::Ping->new("tcp", 2);
-           $status = $p->ping($server);
+           # ping the echo port (7) without service check
+           $status = PVE::Network::tcp_ping($server, undef, 2);
 
        } else {