ceph: services: do not create rados object in get_services_info

we always gave one, and the only reason why it could be undef
is that we could not connect, so it makes no sense to try again
and add unecessary time to the api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-06-18 15:42:48 +02:00 committed by Thomas Lamprecht
parent 3e4c0f06e7
commit e7e615768f

View File

@ -107,8 +107,9 @@ sub get_services_info {
}
if (!$rados) {
$rados = PVE::RADOS->new();
return $result;
}
my $metadata = $rados->mon_command({ prefix => "$type metadata" });
foreach my $info (@$metadata) {
my $id = $info->{name} // $info->{id};