mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Merge pull request #1144 from chrismeyersfsu/fix-auto_reprovision
delay looking up settings SYSTEM_UUID
This commit is contained in:
@@ -87,7 +87,11 @@ class InstanceManager(models.Manager):
|
|||||||
return node[0]
|
return node[0]
|
||||||
raise RuntimeError("No instance found with the current cluster host id")
|
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):
|
with advisory_lock('instance_registration_%s' % hostname):
|
||||||
instance = self.filter(hostname=hostname)
|
instance = self.filter(hostname=hostname)
|
||||||
if instance.exists():
|
if instance.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user