From 3de423680a5e9e8f8955ba11c1b52ec5a56f9d3b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 2 Oct 2020 15:55:03 +0200 Subject: [PATCH] PBS: use simple TCP ping for online check for now Signed-off-by: Thomas Lamprecht --- PVE/Storage/PBSPlugin.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index c328298..6403e2e 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -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; }