[pve-devel] [PATCH ha-manager v2 13/18] rules: node affinity: define node priority outside hash access
Daniel Kral
d.kral at proxmox.com
Tue Sep 9 10:33:50 CEST 2025
Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Daniel Kral <d.kral at proxmox.com>
Reviewed-by: Michael Köppl <m.koeppl at proxmox.com>
Tested-by: Michael Köppl <m.koeppl at proxmox.com>
---
no changes since v1
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 f5bc5bf3..8ea2ae0a 100644
--- a/src/PVE/HA/Rules/NodeAffinity.pm
+++ b/src/PVE/HA/Rules/NodeAffinity.pm
@@ -276,8 +276,10 @@ sub get_node_affinity {
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
More information about the pve-devel
mailing list