mirror of
git://git.proxmox.com/git/pve-ha-manager.git
synced 2025-08-26 05:49:21 +03:00
status: show added but not yet active services
If the CRM is dead or not active yet and we add a new service, we do not see it in the HA status. This can be confusing for the user as it is queued for adding but does not shows up, so lets show those services also. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
9742f4085b
commit
2afff38abb
@ -151,10 +151,19 @@ __PACKAGE__->register_method ({
|
||||
|
||||
foreach my $sid (sort keys %{$status->{service_status}}) {
|
||||
my $d = $status->{service_status}->{$sid};
|
||||
push @$res, { id => "service:$sid", type => 'service', sid => $sid,
|
||||
push @$res, { id => "service:$sid", type => 'service', sid => $sid,
|
||||
node => $d->{node}, status => "$sid ($d->{node}, $d->{state})" };
|
||||
}
|
||||
|
||||
|
||||
# show also service which aren't yet processed by the CRM
|
||||
foreach my $sid (sort keys %$service_config) {
|
||||
next if $status->{service_status}->{$sid};
|
||||
my $d = $service_config->{$sid};
|
||||
push @$res, { id => "service:$sid", type => 'service', sid => $sid,
|
||||
status => "$sid ($d->{node}, queued)",
|
||||
node => $d->{node} };
|
||||
}
|
||||
|
||||
return $res;
|
||||
}});
|
||||
|
||||
|
Reference in New Issue
Block a user