mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 04:06:47 +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:
parent
39dda65132
commit
d1fb9bd2d4
14 changed files with 72 additions and 18 deletions
|
|
@ -15,7 +15,7 @@
|
|||
{% include "computes/host_nav.html" with section="interfaces" %}
|
||||
|
||||
{% if changeable is False %}{% include 'interfaces_unchangeable.html' %}{% endif %}
|
||||
{% if not ifaces_all %}
|
||||
{% if ifaces_all is None %}{# not read: the error above says why #}{% elif not ifaces_all %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "libvirt lists no interfaces of this host." %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue