From edd4887a2da37ca656474563ddce3d2803f6ce38 Mon Sep 17 00:00:00 2001 From: Ilya Trefilov Date: Wed, 3 Jul 2019 17:49:22 +0300 Subject: [PATCH] Fix bug with err instead of True in connection_manager.host_is_up, which lead to freeze in panel if compute is down --- instances/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instances/views.py b/instances/views.py index 130e2d9..3a01a62 100644 --- a/instances/views.py +++ b/instances/views.py @@ -928,7 +928,7 @@ def get_host_instances(request, comp): all_host_vms = {} status = connection_manager.host_is_up(comp.type, comp.hostname) - if status: + if status is True: conn = wvmHostDetails(comp, comp.login, comp.password, comp.type) comp_node_info = conn.get_node_info() comp_mem = conn.get_memory_usage() @@ -949,7 +949,8 @@ def get_host_instances(request, comp): refresh_instance_database(comp_info, vm, info) conn.close() - + else: + raise libvirtError("Problem occured with {} - {}".format(comp.name, status)) return all_host_vms