[pve-devel] [PATCH ha-manager 1/2] LRM: do not count erroneous service as active

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 29 16:41:30 CEST 2016

We do not can touch them thus they are considered frozen.

Fixes an infinite hand on updating or restarting a nodes LRM when a
service within the error state is located on it.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>

Tested with upgrading the ha-manager of a three node cluster at once
with multiple erroneous services all over the places, works as
expected, the upgrade finishes and all previously erroneous services
are also in the error state after the upgrade

 src/PVE/HA/LRM.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm
index fcbc33f..b7a3201 100644
--- a/src/PVE/HA/LRM.pm
+++ b/src/PVE/HA/LRM.pm
@@ -180,6 +180,8 @@ sub active_service_count {
 	next if !defined($req_state);
 	next if $req_state eq 'stopped';
 	next if $req_state eq 'freeze';
+	# we mustn't touch erroneous services, so they are not active
+	next if $req_state eq 'error';

More information about the pve-devel mailing list