From fe3d79b5ec086744fca5687832cda6bb890e136c Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Fri, 24 Feb 2017 09:59:34 -0500 Subject: [PATCH 1/2] Revert "Merge pull request #5527 from chrismeyersfsu/fix-log_settings" This reverts commit 3db0242ef9a8b1ce67e159b8a19e0c1e70330b7c, reversing changes made to e6893bb7f3cf696c202c39103b432c20afa6ec08. --- awx/main/conf.py | 13 ++----------- awx/main/utils/handlers.py | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/awx/main/conf.py b/awx/main/conf.py index 96c589e632..bbdf159ae6 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -2,11 +2,9 @@ import json import logging import os -import uuid # Django from django.utils.translation import ugettext_lazy as _ -from django.conf import settings # Tower from awx.conf import fields, register @@ -316,20 +314,13 @@ register( category=_('Logging'), category_slug='logging', ) - - -def init_LOG_AGGREGATOR_TOWER_UUID(): - unique_id = uuid.uuid4() - settings.LOG_AGGREGATOR_TOWER_UUID = unique_id - return unique_id - - register( 'LOG_AGGREGATOR_TOWER_UUID', field_class=fields.CharField, + allow_blank=True, label=_('Cluster-wide Tower unique identifier.'), help_text=_('Useful to uniquely identify Tower instances.'), category=_('Logging'), category_slug='logging', - default=init_LOG_AGGREGATOR_TOWER_UUID, + default=None, ) diff --git a/awx/main/utils/handlers.py b/awx/main/utils/handlers.py index fe2fb87228..874a5e6046 100644 --- a/awx/main/utils/handlers.py +++ b/awx/main/utils/handlers.py @@ -88,7 +88,7 @@ class BaseHTTPSHandler(logging.Handler): self.session.headers.update(headers) def get_http_host(self): - host = self.host or '' + host = self.host if not host.startswith('http'): host = 'http://%s' % self.host if self.port != 80 and self.port is not None: From 2f604f30d9c04706fc5f13fdd3674b615679fceb Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Thu, 23 Feb 2017 14:31:24 -0500 Subject: [PATCH 2/2] host may be None, account for that --- awx/main/utils/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/utils/handlers.py b/awx/main/utils/handlers.py index 874a5e6046..fe2fb87228 100644 --- a/awx/main/utils/handlers.py +++ b/awx/main/utils/handlers.py @@ -88,7 +88,7 @@ class BaseHTTPSHandler(logging.Handler): self.session.headers.update(headers) def get_http_host(self): - host = self.host + host = self.host or '' if not host.startswith('http'): host = 'http://%s' % self.host if self.port != 80 and self.port is not None: