From d8ea0920c501d35abcf0566a05cb655d382dd2b3 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 16 Sep 2016 11:35:46 -0400 Subject: [PATCH 1/2] Update configuration and playbook for rabbitmq * Purge remaining zeromq settings * Make sure we have CALLBACK_QUEUE defined where needed * Update setup playbook to not be tied to old ha primary/secondary concept --- awx/settings/defaults.py | 4 +--- awx/settings/development.py | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 174824d8d3..fc108b26ea 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -737,9 +737,7 @@ ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC = False # Internal API URL for use by inventory scripts and callback plugin. INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT -# ZeroMQ callback settings. -CALLBACK_CONSUMER_PORT = "tcp://127.0.0.1:5556" -CALLBACK_QUEUE_PORT = "ipc:///tmp/callback_receiver.ipc" +CALLBACK_QUEUE = "callback_tasks" TASK_COMMAND_PORT = 6559 diff --git a/awx/settings/development.py b/awx/settings/development.py index 2140d2a856..18072e6bc6 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -36,11 +36,6 @@ TEMPLATE_LOADERS = ( if 'celeryd' in sys.argv: SQL_DEBUG = False -# Use a different callback consumer/queue for development, to avoid a conflict -# if there is also a nightly install running on the development machine. -CALLBACK_CONSUMER_PORT = "tcp://127.0.0.1:5557" -CALLBACK_QUEUE_PORT = "ipc:///tmp/callback_receiver_dev.ipc" - CALLBACK_QUEUE = "callback_tasks" # Enable PROOT for tower-qa integration tests From a4ec0739ea838041931b1b437d7f3982b9fe1694 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 16 Sep 2016 15:21:42 -0400 Subject: [PATCH 2/2] Temporarily disable instance id gathering During requests --- awx/main/managers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index ca4578daf4..bb796865b4 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -32,8 +32,13 @@ class InstanceManager(models.Manager): hostname='localhost', uuid='00000000-0000-0000-0000-000000000000') - # Return the appropriate record from the database. - return self.get(hostname=socket.gethostname()) + # If we can determine the instance we are on then return + # that, otherwise None which would be the standalone + # case + # TODO: Replace, this doesn't work if the hostname + # is different from the Instance.name + # node = self.filter(hostname=socket.gethostname()) + return self.all()[0] def my_role(self): # NOTE: TODO: Likely to repurpose this once standalone ramparts are a thing