[pve-devel] [PATCH ha-manager v2 4/8] rules: resource affinity: decouple get_resource_affinity helper from Usage class

Fiona Ebner f.ebner at proxmox.com
Tue Oct 21 15:02:39 CEST 2025


Am 20.10.25 um 6:46 PM schrieb Daniel Kral:
> The resource affinity rules need information about the other HA
> resource's used nodes to be enacted correctly, which has been proxied
> through $online_node_usage before.
> 
> The get_used_service_nodes(...) helper reflects the same logic to
> retrieve the nodes, where a HA resource $sid currently puts load on, as
> in recompute_online_node_usage(...).
> 
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>
> Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> changes since v1:
>  - move get_used_service_nodes(...) helper to PVE::HA::Usage class
>  - change get_used_service_nodes(...) signature from
>         ($sd, $online_nodes)
>    to
>         ($online_nodes, $state, $node, $target)
>  - change return value of get_used_service_nodes(...) from hash ref to
>    two-element array
>  - added R-b

If there's this much change, I would prefer the R-b not to be added. The
v2 is a quite different patch from what I saw when giving the R-b. I did
review the v2 now, so you can keep the tag :)




More information about the pve-devel mailing list