From cb16114aba6ea160dd0c04b0923e348f6d1dfa47 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 19 Oct 2026 20:53:32 +0530 Subject: [PATCH 1/2] Do not break the VM list when a VM's OpenNebula template was deleted The "my virtual machines" page showed "We could not load your VMs due to a backend connection error" for any user owning a VM whose template had been removed from OpenNebula. OpenNebulaManager.get_template() converted every failure, including WrongIdError for a missing template, into ConnectionRefusedError, and VirtualMachineSerializer.get_configuration() let that propagate, so one VM with a stale template id took down the whole list. The only log output was an empty ERROR line, because WrongIdError has no message. * Add opennebula_api.exceptions.TemplateNotFoundError and raise it from get_template() for a missing template; keep ConnectionRefusedError for genuine backend failures and log them with a traceback. * Add OpenNebulaManager.get_template_names() and resolve_template_id() so the serializer fetches the template pool once per list instead of constructing an OpenNebulaManager and fetching the pool for every VM. * get_configuration() now falls back to the template name embedded in the VM name ("