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:
		@@ -88,7 +88,7 @@ def getClusterHealth(zkhandler, node_list, vm_list, ceph_osd_list):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    for index, vm in enumerate(vm_list):
 | 
					    for index, vm in enumerate(vm_list):
 | 
				
			||||||
        # Handle unhealthy VM states
 | 
					        # 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_value -= health_delta_map["vm_stopped"]
 | 
				
			||||||
            cluster_health_messages.append(
 | 
					            cluster_health_messages.append(
 | 
				
			||||||
                f"cluster: VM {vm['name']} in {vm['state'].upper()} state"
 | 
					                f"cluster: VM {vm['name']} in {vm['state'].upper()} state"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user