From eef6f7ecb001f36197cf1770291417514f8081b8 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Wed, 28 Mar 2018 09:50:53 -0400 Subject: [PATCH] delay looking up settings SYSTEM_UUID --- awx/main/managers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index 1683b38c4e..8748a71c5b 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -87,7 +87,11 @@ class InstanceManager(models.Manager): return node[0] raise RuntimeError("No instance found with the current cluster host id") - def register(self, uuid=settings.SYSTEM_UUID, hostname=settings.CLUSTER_HOST_ID): + def register(self, uuid=None, hostname=None): + if not uuid: + uuid = settings.SYSTEM_UUID + if not hostname: + hostname = settings.CLUSTER_HOST_ID with advisory_lock('instance_registration_%s' % hostname): instance = self.filter(hostname=hostname) if instance.exists():