PBS: use simple TCP ping for online check for now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2020-10-02 15:55:03 +02:00
parent 4133e6e216
commit 3de423680a

View 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;
}