]> git.proxmox.com Git - pve-storage.git/commitdiff
PBS: use simple TCP ping for online check for now
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Oct 2020 13:55:03 +0000 (15:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Oct 2020 13:55:03 +0000 (15:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/PBSPlugin.pm

index c3282989e303806ac1ab0b42b28447619208cb8a..6403e2e810b6086c28e3a91edd8c672872b133fd 100644 (file)
@@ -555,7 +555,11 @@ sub status {
 sub activate_storage {
     my ($class, $storeid, $scfg, $cache) = @_;
 
-    run_client_cmd($scfg, $storeid, "status");
+    # a 'status' client command is to expensive here
+    # TODO: use a dummy ping API call to ensure the PBS API daemon is available for real
+    my $server = $scfg->{server};
+    my $port = $scfg->{port} // 8007;
+    PVE::Network::tcp_ping($server, $port, 2);
 
     return 1;
 }