From c2d8b56a971059901487db6bb307f969401e9254 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 18 Nov 2022 14:24:25 +0100 Subject: [PATCH] manager: better convey that basic is always the fallback to hint to a potential "code optimizer" that it may not be easily moved above to the scheduling selection Signed-off-by: Thomas Lamprecht --- src/PVE/HA/Manager.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index 69bfbc3..56f9efb 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -219,11 +219,14 @@ sub recompute_online_node_usage { }; $haenv->log('warning', "using 'basic' scheduler mode, init for 'static' failed - $@") if $@; - } elsif ($mode ne 'basic') { + } elsif ($mode eq 'basic') { + # handled below in the general fall-back case + } else { $haenv->log('warning', "got unknown scheduler mode '$mode', using 'basic'"); } } + # fallback to the basic algorithm in any case if (!$online_node_usage) { $online_node_usage = PVE::HA::Usage::Basic->new($haenv); $online_node_usage->add_node($_) for $online_nodes->@*; -- 2.39.2