From 195aff37ad812fd7805ff726ad71cef691fdb993 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 7 Jun 2018 11:19:21 -0400 Subject: [PATCH] default instance capacity to zero at registration/insertion time if the first health check fails due to AMQP or celery issues, the capacity will stay at the default of 100 (which is confusing) see: https://github.com/ansible/tower/issues/2085 --- awx/main/managers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index d2af95e2b8..f31a532572 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -96,7 +96,7 @@ class InstanceManager(models.Manager): instance = self.filter(hostname=hostname) if instance.exists(): return (False, instance[0]) - instance = self.create(uuid=uuid, hostname=hostname) + instance = self.create(uuid=uuid, hostname=hostname, capacity=0) return (True, instance) def get_or_register(self):