still alert if all pods are on one host
@@ -83,10 +83,10 @@ class InfraNodePodStatus(object):
host_ips = set([x['hostIP'] for x in pods])
logging.getLogger().info("Hosts found: %d", len(host_ips))
- if len(host_ips) > len(pods):
+ if (len(host_ips) > len(pods)) or len(host_ips) == 1:
result_code = 0
logging.getLogger().critical(
- "%s has %d pods on %d hosts, not evenly distributed",
+ "%s has %d pods on %d hosts, not distributed",
podname, len(pods), len(host_ips))
if result_code == 0:
