1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 04:36:48 +00:00

fix(console,computes): an unreachable host is named as the cause, not an empty list

The console page of a VM whose host does not answer said "Fail to get
console. Please check the console configuration of your VM." and logged
nothing. It now shows the connection error (to users who do not see the
hosts, that the host cannot be reached) and logs it with the VM and host.

A host's Storage, Networks, Interfaces, Filters and Secrets pages showed
the connection error and also "This host has no ...". The list is None
when it was not read, and the page shows only the error.
This commit is contained in:
catborise 2026-11-06 23:08:11 +03:00
parent 39dda65132
commit d1fb9bd2d4
14 changed files with 72 additions and 18 deletions

View file

@ -16,6 +16,7 @@ from admin.decorators import superuser_only
def interfaces(request, compute_id):
"""The host's interfaces, and a new one where its libvirt can define them."""
compute = get_object_or_404(Compute, pk=compute_id)
ifaces_all = None # not read: the page shows no list
try:
conn = wvmInterfaces(compute.hostname, compute.login, compute.password, compute.type)