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

Daniel Kral d.kral at proxmox.com
Fri Aug 1 09:11:50 CEST 2025


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(




More information about the pve-devel mailing list