[pve-devel] [RFC ha-manager v2 2/2] status: show added but not yet active services

Dietmar Maurer dietmar at proxmox.com
Tue Mar 15 12:36:02 CET 2016


comments inline

> 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 at proxmox.com>
> ---
>  src/PVE/API2/HA/Status.pm | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/API2/HA/Status.pm b/src/PVE/API2/HA/Status.pm
> index 252cd78..2f6be3f 100644
> --- a/src/PVE/API2/HA/Status.pm
> +++ b/src/PVE/API2/HA/Status.pm
> @@ -151,10 +151,18 @@ __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})" };
> +	    delete $service_config->{$sid};

Not sure if it is a good idea to modify the config here...




More information about the pve-devel mailing list