From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id ECB241FF179 for ; Wed, 1 Oct 2025 16:02:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AEFC2208A9; Wed, 1 Oct 2025 16:03:00 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Wed, 1 Oct 2025 16:02:45 +0200 Message-ID: <20251001140253.121445-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759327354360 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, config.pm, resources.pm] Subject: [pve-devel] [PATCH ha-manager 0/1] api: relocate/migrate resource: improve initialization of variables to avoid Perl warning X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" As reported in the community forum [0], the resource relocation endpoint would produce a warning: > Can't use an undefined value as an ARRAY reference In the get_resource_motion_info() function, properly initialize the array references in the $blocking_resources_by_node hash to avoid this. Note that the migration endpoint needs to be adapted to only include 'blocking-resources' in the result if there is at least one entry in the array to be compatible with this change. Align the behavior of both migration and relocation endpoints, so that the migration endpoint correctly handles the initialized, but empty array too. Alternatively, it could've been done the other way with the relocation endpoint also checking for the array reference to be undefined if no entries are to be added to the array, but since $comigrated_resources is also initialized when empty, it seemed cleaner to go with the approach here. [0]: https://forum.proxmox.com/threads/173149/ pve-ha-manager: Fiona Ebner (1): api: relocate/migrate resource: improve initialization of variables to avoid Perl warning src/PVE/API2/HA/Resources.pm | 2 +- src/PVE/HA/Config.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) Summary over all repositories: 2 files changed, 2 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