From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 347E31FF180 for ; Fri, 1 Aug 2025 09:34:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 27BD311A12; Fri, 1 Aug 2025 09:36:01 +0200 (CEST) Message-ID: Date: Fri, 1 Aug 2025 09:35:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Proxmox VE development discussion , Daniel Kral , Gabriel Goller References: <20250731155846.277381-1-g.goller@proxmox.com> <141b96fb-fdb3-4f0a-941e-0cfb76393797@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754033711771 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.180 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 POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes 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 Subject: Re: [pve-devel] [RFC PATCH manager] migrate: fix conntrack migration and ha-resources checkbox 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 Cc: pve-devel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 01.08.25 um 09:11 schrieb Daniel Kral: > Thanks for spotting that! > > On Fri Aug 1, 2025 at 8:38 AM CEST, Thomas Lamprecht wrote: >> Am 31.07.25 um 17:58 schrieb Gabriel Goller: >>> + console.warn(`failed to query /capabilites/qemu/migration on '${target}':`); >>> + console.warn(err); >>> } >>> >>> me.fetchingNodeMigrateInfo = false; >>> @@ -447,7 +448,7 @@ Ext.define('PVE.window.Migrate', { >>> } >>> >>> let comigratedHAResources = migrateStats['comigrated-ha-resources']; >>> - if (comigratedHAResources !== undefined) { >>> + if (comigratedHAResources !== undefined && typeof comigratedHAResources[Symbol.iterator] === 'function') { >> >> If it exists this is always an array per the schema though, >> so the following might be enough: >> >> if (typeof comigratedHAResources === 'array') { >> >> Or use the ExtJS frameworks' Ext.isIterable() while under the hood it's a bit more >> heuristic than your check, it should cover all (for us) relevant cases >> >> if (Ext.isIterable(comigratedHAResources)) { >> >> Your variant might be fine as Proxmox.Utils method though, but rather overkill for >> now. > > Another even simpler version that we use in the function already (e.g. > right above for blockingHAResources) is to just fallback to an empty > array, i.e. > > let comigratedHAResources = migrateStats['comigrated-ha-resources'] ?? []; > if (comigratedHAResources.length) { > ... FWIW, the backend is wrongly setting this to an object by default, that might contribute to the error here, or even be its actual source! I'm fixing this up there and will also do a s/comigrated/dependent/ as that's what this actually describes, that these resources then normally also migrate is the result not the cause, and might change with node affinity rules being mixed with non-strict resource once in the future. > > > Either way, the fix should also be done for checkLxcPreconditions(...), > because there it's missing the check too. > Will also take another look at the backend here. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel