From ea998b07ef72d45ce5afb2d4d80f3f09fe5a5623 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 30 Mar 2019 19:52:46 +0100 Subject: [PATCH] service data: only set failed_nodes key if needed Currently we always set this, and thus each services gets a "failed_nodes": null, entry in the written out JSON ha/manager_status so only set if neeed, which can reduce mananager_status quite a bit with a lot of services. Signed-off-by: Thomas Lamprecht --- src/PVE/HA/Manager.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index a6c9b8e..0b90de4 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -218,7 +218,7 @@ my $change_service_state = sub { $sd->{state} = $new_state; $sd->{node} = $old_node; - $sd->{failed_nodes} = $old_failed_nodes; + $sd->{failed_nodes} = $old_failed_nodes if defined($old_failed_nodes); my $text_state = ''; foreach my $k (sort keys %params) { -- 2.39.2