Open cfm opened 2 months ago
It looks like apply_updates_to_appvm()
tries to check the status of vm
even when it's not updateable
. Naïvely, this patch eliminates the KeyError
, though I'll have to wait for a template to have pending updates again to test this in that case:
Edit: This does not do the trick after all.
--- a/vmupdate/vmupdate.py
+++ b/vmupdate/vmupdate.py
@@ -324,7 +324,7 @@ def apply_updates_to_appvm(
updated_tmpls = [
vm for vm in vm_updated
- if bool(template_statuses[vm.name]) and vm.klass == 'TemplateVM'
+ if getattr(vm, "updateable", False) and vm.klass == "TemplateVM" and bool(template_statuses[vm.name])
]
to_restart, to_shutdown = get_derived_vm_to_apply(
updated_tmpls, derived_statuses)
Qubes OS release
R4.2.2
Brief summary
Running
qubes-vm-update --templates
can fail with aKeyError
on some templates: in my testing, both a stock template and a clone I've created.Steps to reproduce
Expected behavior
No unhandled errors.
Actual behavior
The first run fails on a template cloned from
debian-12-xfce
, with VM-level errors that I believe are not relevant here:The second run fails on stock
fedora-40-xfce
, without VM-level errors: