Flip VM state condition to remove shutdown

Don't cause health degredation for shutdown state, and flip the list
around to make it clearer.
This commit is contained in:
Joshua Boniface 2023-02-16 20:32:33 -05:00
parent eda1b95d5f
commit 70ba364f1d
1 changed files with 1 additions and 1 deletions

View File

@ -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"