[pve-devel] [PATCH ha-manager v2 05/18] rules: add merged positive resource affinity info in global checks

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Sep 10 19:35:19 CEST 2025


Am 09.09.25 um 10:36 schrieb Daniel Kral:
> The node affinity and positive resource affinity rule subset is checked
> whether the HA resources in a positive resource affinity rule are in
> more than one node affinity rule in total.
> 
> This check has the assumption that each positive resource affinity
> rule's resource set is disjoint from each other, but this is only done
> in the later transformation stage when positive resource affinity with
> overlapping HA resources in them are merged to one rule.
> 
> For example, the following inconsistent rules are not pruned:
> 
> - positive resource affinity rule between vm:101 and vm:102
> - positive resource affinity rule between vm:102 and vm:103
> - node affinity rule for vm:101 on node1
> - node affinity rule for vm:103 on node3

This is only a real problem if both node affinity rules are configured
to be strict. Your test case (and FWICT code) acts that way, so mostly
relevant for the commit message to avoid potential confusion about what
rules get/needs to be pruned. Can be improved on applying though, no need
for a v3 just for that, just wanted to note it to avoid forgetting it in
case I do not get around to finish review here soonish.

> 
> Therefore build the same disjoint positive resource affinity resource
> sets as the merge_connected_positive_resource_affinity_rules(...)
> subroutine, so that the inconsistency check has the necessary
> information in advance.
> 




More information about the pve-devel mailing list