diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index 6e40ec12a7..455d10d2cb 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -374,6 +374,11 @@ class Instance(HasPolicyEditsMixin, BaseModel): self.memory = new_memory update_fields.append('memory') + # Do not mark nodes READY if cpu or memory is zero + if not errors and self.node_type != Instance.Types.HOP and (not new_cpu or not new_memory): + errors = _('Health check for {} reported invalid values: cpu={}, memory={}').format(self.hostname, new_cpu, new_memory) + logger.warning(errors) + if not errors: self.refresh_capacity_fields() self.errors = ''