mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 02:55:34 +00:00
ceph: get_local_services: also check /var/lib/ceph/$type
so we do not miss disabled services Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
2d7d6c9ac9
commit
74628668d7
@ -10,6 +10,7 @@ use PVE::RADOS;
|
|||||||
use File::Path;
|
use File::Path;
|
||||||
|
|
||||||
# checks /etc/systemd/system/ceph-* to list all services, even if not running
|
# checks /etc/systemd/system/ceph-* to list all services, even if not running
|
||||||
|
# also checks /var/lib/ceph/$type
|
||||||
sub get_local_services {
|
sub get_local_services {
|
||||||
my $res = {};
|
my $res = {};
|
||||||
|
|
||||||
@ -20,9 +21,14 @@ sub get_local_services {
|
|||||||
my $regex = "ceph-$type\@(.*)\.service";
|
my $regex = "ceph-$type\@(.*)\.service";
|
||||||
PVE::Tools::dir_glob_foreach($path, $regex, sub {
|
PVE::Tools::dir_glob_foreach($path, $regex, sub {
|
||||||
my (undef, $id) = @_;
|
my (undef, $id) = @_;
|
||||||
$res->{$type}->{$id} = {
|
$res->{$type}->{$id}->{service} = 1;
|
||||||
service => 1,
|
});
|
||||||
}
|
|
||||||
|
$path = "/var/lib/ceph/$type";
|
||||||
|
$regex = "([^-]+)-(.*)";
|
||||||
|
PVE::Tools::dir_glob_foreach($path, $regex, sub {
|
||||||
|
my (undef, $clustername, $id) = @_;
|
||||||
|
$res->{$type}->{$id}->{direxists} = 1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return $res;
|
return $res;
|
||||||
|
Loading…
Reference in New Issue
Block a user