[pve-devel] [PATCH ha-manager 1/1] api: relocate/migrate resource: improve initialization of variables to avoid Perl warning
Daniel Kral
d.kral at proxmox.com
Fri Oct 3 09:47:51 CEST 2025
On Thu Oct 2, 2025 at 3:39 PM CEST, Fiona Ebner wrote:
> Am 02.10.25 um 2:18 PM schrieb Daniel Kral:
>> On Wed Oct 1, 2025 at 4:02 PM CEST, Fiona Ebner wrote:
>>> diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm
>>> index 301c62f..b52465f 100644
>>> --- a/src/PVE/HA/Config.pm
>>> +++ b/src/PVE/HA/Config.pm
>>> @@ -397,6 +397,7 @@ sub get_resource_motion_info {
>>> push @$dependent_resources, $_ for sort keys %$together;
>>>
>>> for my $node (keys %$ns) {
>>> + $blocking_resources_by_node->{$node} = [];
>>
>> Unfortunately this breaks some callers of get_resource_motion_info(...),
>> which assume that a set $blocking_resources_by_node->{$node} means that
>> there was some blocking HA resource on that node, e.g.
>>
>> $ ha-manager crm-command migrate vm:10000 node2
>> cannot migrate resource 'vm:10000' to node 'node2':
>
> Are you sure this is with the first part of my patch included? It works
> for me.
>
My bad, I'm sorry, you're right!
More information about the pve-devel
mailing list