Suggested-by: Thomas Lamprecht <[email protected]>
Signed-off-by: Daniel Kral <[email protected]>
Reviewed-by: Michael Köppl <[email protected]>
Tested-by: Michael Köppl <[email protected]>
---
src/PVE/HA/Rules/NodeAffinity.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/HA/Rules/NodeAffinity.pm b/src/PVE/HA/Rules/NodeAffinity.pm
index adef97d0..d98f896d 100644
--- a/src/PVE/HA/Rules/NodeAffinity.pm
+++ b/src/PVE/HA/Rules/NodeAffinity.pm
@@ -276,8 +276,10 @@ sub get_node_affinity : prototype($$$) {
while (my ($node, $props) = each $node_affinity->{$sid}->{nodes}->%*) {
next if !defined($online_nodes->{$node}); # node is offline
+ my $node_priority = $props->{priority} // 0;
+
$allowed_nodes->{$node} = 1;
- $prioritized_nodes->{ $props->{priority} }->{$node} = 1;
+ $prioritized_nodes->{$node_priority}->{$node} = 1;
}
my $preferred_nodes = {};
--
2.47.3
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel