[pve-devel] [RFC PATCH manager] migrate: fix conntrack migration and ha-resources checkbox

Gabriel Goller g.goller at proxmox.com
Thu Jul 31 17:58:46 CEST 2025


The checkbox wasn't displayed and following errors were on the console:

failed to query /capabilites/qemu/migration on '': [object Object] pvemanagerlib.js:20401:25
Uncaught (in promise) TypeError: comigratedHAResources is not iterable
    checkQemuPreconditions https://172.16.0.18:8006/pve2/js/pvemanagerlib.js?ver=9.0.0~17:20595

Error is an object, so we need to print it in the next line, otherwise
only [object Object] is shown. Check if comigratedHAResources is
iterable, otherwise don't iterate over it.

Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---

Tested this quickly but no idea if it's correct. Maybe Daniel and
Christoph could have a look at it.

 www/manager6/window/Migrate.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index b5ecb9603cf1..c884fbddd1aa 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -254,7 +254,8 @@ Ext.define('PVE.window.Migrate', {
             } catch (err) {
                 // Only emit a warning in the case the target node does not (yet) support the
                 // `capabilites/qemu/migration` endpoint and simply treat all features as unsupported.
-                console.warn(`failed to query /capabilites/qemu/migration on '${target}': ${err}`);
+                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') {
                 for (const sid of comigratedHAResources) {
                     const text = Ext.String.format(
                         gettext(
-- 
2.39.5





More information about the pve-devel mailing list