[pve-devel] [PATCH ha-manager v2 4/8] rules: resource affinity: decouple get_resource_affinity helper from Usage class
    Daniel Kral 
    d.kral at proxmox.com
       
    Thu Oct 23 10:20:46 CEST 2025
    
    
  
On Tue Oct 21, 2025 at 3:02 PM CEST, Fiona Ebner wrote:
> 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 :)
Right, I had the gut feeling that it this should get another look with
the amount of changes, I'll keep that in mind the next time, thanks for
the reminder :)
    
    
More information about the pve-devel
mailing list