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 CCD2B1FF180 for ; Fri, 1 Aug 2025 09:10:28 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 27BDB11161; Fri, 1 Aug 2025 09:11:54 +0200 (CEST) Mime-Version: 1.0 Date: Fri, 01 Aug 2025 09:11:50 +0200 Message-Id: From: "Daniel Kral" To: "Proxmox VE development discussion" , "Gabriel Goller" X-Mailer: aerc 0.20.0 References: <20250731155846.277381-1-g.goller@proxmox.com> <141b96fb-fdb3-4f0a-941e-0cfb76393797@proxmox.com> In-Reply-To: <141b96fb-fdb3-4f0a-941e-0cfb76393797@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754032297307 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.136 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" 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) { ... Either way, the fix should also be done for checkLxcPreconditions(...), because there it's missing the check too. > >> for (const sid of comigratedHAResources) { >> const text = Ext.String.format( >> gettext( _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel