* [pve-devel] [PATCH ha-manager v2 0/1] fix #6881: api: relocate resource: fix check to avoid Perl warning
@ 2025-10-02 13:50 Fiona Ebner
2025-10-02 13:50 ` [pve-devel] [PATCH ha-manager v2 1/1] " Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-10-02 13:50 UTC (permalink / raw)
To: pve-devel
The resource relocation endpoint would produce a warning when there
are no blocking resources on the target node:
> Can't use an undefined value as an ARRAY reference
Align the relocation endpoint to do the check in the same manner as
the migration endpoint to avoid the warning.
pve-ha-manager:
Fiona Ebner (1):
fix #6881: api: relocate resource: fix check to avoid Perl warning
src/PVE/API2/HA/Resources.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Summary over all repositories:
1 files changed, 1 insertions(+), 1 deletions(-)
--
Generated by git-murpp 0.5.0
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] [PATCH ha-manager v2 1/1] fix #6881: api: relocate resource: fix check to avoid Perl warning
2025-10-02 13:50 [pve-devel] [PATCH ha-manager v2 0/1] fix #6881: api: relocate resource: fix check to avoid Perl warning Fiona Ebner
@ 2025-10-02 13:50 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-10-02 13:50 UTC (permalink / raw)
To: pve-devel
The resource relocation endpoint would produce a warning when there
are no blocking resources on the target node:
> Can't use an undefined value as an ARRAY reference
Align the relocation endpoint to do the check in the same manner as
the migration endpoint to avoid the warning.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
Changes in v2:
* Alternative approach, align check for relocation with how it's done
for migration. This avoids the need to adapt callers outside the
ha-manager package, which v1 failed to do.
src/PVE/API2/HA/Resources.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm
index 894fe90..acdd499 100644
--- a/src/PVE/API2/HA/Resources.pm
+++ b/src/PVE/API2/HA/Resources.pm
@@ -495,7 +495,7 @@ __PACKAGE__->register_method({
my $blocking_resources = $blocking_resources_by_node->{$req_node};
$result->{'comigrated-resources'} = $comigrated_resources if @$comigrated_resources;
- $result->{'blocking-resources'} = $blocking_resources if @$blocking_resources;
+ $result->{'blocking-resources'} = $blocking_resources if $blocking_resources;
return $result;
},
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-02 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-02 13:50 [pve-devel] [PATCH ha-manager v2 0/1] fix #6881: api: relocate resource: fix check to avoid Perl warning Fiona Ebner
2025-10-02 13:50 ` [pve-devel] [PATCH ha-manager v2 1/1] " Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox