From f25e436bef7e76f9d221081cb72f7e6650b40ace Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Mon, 22 Jun 2026 10:23:52 -0400 Subject: [PATCH] Do not mark node READY when health check reports zero cpu or memory (#16511) Instances reporting cpu=0 or memory=0 with no errors would be transitioned to READY state. Treat zero cpu/memory as an error so the node stays offline until a valid health check is received. Co-authored-by: Claude Opus 4.6 (1M context) --- awx/main/models/ha.py | 5 +++++ 1 file changed, 5 insertions(+) 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 = ''