Report single node clusters as non-ha (#11212)

* Report single node clusters as non-ha

* Move test file so we can make it use the database

* Update unit test to accomidate different node types
This commit is contained in:
Alan Rominger
2021-10-06 10:50:18 -04:00
committed by GitHub
parent b70793db5c
commit e52416fd47
3 changed files with 20 additions and 18 deletions

View File

@@ -10,6 +10,6 @@ def is_ha_environment():
otherwise.
"""
# If there are two or more instances, then we are in an HA environment.
if Instance.objects.count() > 1:
if Instance.objects.filter(node_type__in=('control', 'hybrid')).count() > 1:
return True
return False