From 70ba364f1d356b1db94306e2f751ffcc50421941 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 16 Feb 2023 20:32:33 -0500 Subject: [PATCH] Flip VM state condition to remove shutdown Don't cause health degredation for shutdown state, and flip the list around to make it clearer. --- daemon-common/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon-common/cluster.py b/daemon-common/cluster.py index 131761af..a5139997 100644 --- a/daemon-common/cluster.py +++ b/daemon-common/cluster.py @@ -88,7 +88,7 @@ def getClusterHealth(zkhandler, node_list, vm_list, ceph_osd_list): for index, vm in enumerate(vm_list): # Handle unhealthy VM states - if vm["state"] not in ["start", "disable", "migrate", "unmigrate", "provision"]: + if vm["state"] in ["stop", "fail"]: cluster_health_value -= health_delta_map["vm_stopped"] cluster_health_messages.append( f"cluster: VM {vm['name']} in {vm['state'].upper()} state"