Daniel Kral <d.k...@proxmox.com> writes:

> On 4/23/25 15:03, Daniel Herzig wrote:
>> Move the queries for vCLS machines and empty datastore strings into
>> the already existing try-except routine to save `listvms.py` from
>> breaking when `vm.config` is `None`.
>> Do not store the result of the `any` function in a variable anymore,
>> do the same for the datastore query to shorten code.
>> Prepare more verbose logging.
>> Signed-off-by: Daniel Herzig <d.her...@proxmox.com>
>
> Oops, I should have prefixed my patch with a "fix" at least, but I've
> sent two patches some days ago for this ;):
>
> https://lore.proxmox.com/pve-devel/20250411150634.253684-1-d.k...@proxmox.com/T/#u
>
Ha, I missed that one, you were too quick ;)

It turned out that the problem was on the specific ESXI-side config
(`vm.config` is there on ESXI-6.7.x as well, without it we could not do
anything anyway -- `fetch_and_update_vm_data` calls it more than
once inherently). But it's `None` for sure if there's an invalid vm config on 
the ESXI side.

OP on bugzilla reported that once these invalid VMs were removed from
ESXI, 'standard 0.7.3' started working as expected.

But for the earlier vCLS commit I totally missed that
possibility (shame on me) and placed the queries 'unprotected' (unlike
`fetch_and_update_vm_data`).

> But it's also good to just extend the scope of the try-catch here
> without the additional check for whether the vm.config has a value or
> not.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to