From b721a4b36164ff149ee2a2529a824fd0320e3845 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 23 Nov 2021 15:00:46 -0500 Subject: [PATCH] Remove dev-only log filters and downgrade periodic logs --- awx/main/dispatch/pool.py | 4 ++-- awx/main/dispatch/worker/base.py | 4 ++-- awx/main/scheduler/task_manager.py | 2 +- awx/settings/development.py | 14 -------------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/awx/main/dispatch/pool.py b/awx/main/dispatch/pool.py index f0be3b9917..97e2fa630a 100644 --- a/awx/main/dispatch/pool.py +++ b/awx/main/dispatch/pool.py @@ -248,7 +248,7 @@ class WorkerPool(object): except Exception: logger.exception('could not fork') else: - logger.warn('scaling up worker pid:{}'.format(worker.pid)) + logger.debug('scaling up worker pid:{}'.format(worker.pid)) return idx, worker def debug(self, *args, **kwargs): @@ -387,7 +387,7 @@ class AutoscalePool(WorkerPool): # more processes in the pool than we need (> min) # send this process a message so it will exit gracefully # at the next opportunity - logger.warn('scaling down worker pid:{}'.format(w.pid)) + logger.debug('scaling down worker pid:{}'.format(w.pid)) w.quit() self.workers.remove(w) if w.alive: diff --git a/awx/main/dispatch/worker/base.py b/awx/main/dispatch/worker/base.py index edb22b8797..1ebf6ccc60 100644 --- a/awx/main/dispatch/worker/base.py +++ b/awx/main/dispatch/worker/base.py @@ -60,7 +60,7 @@ class AWXConsumerBase(object): return f'listening on {self.queues}' def control(self, body): - logger.warn(body) + logger.warn(f'Received control signal:\n{body}') control = body.get('control') if control in ('status', 'running'): reply_queue = body['reply_to'] @@ -137,7 +137,7 @@ class AWXConsumerPG(AWXConsumerBase): def run(self, *args, **kwargs): super(AWXConsumerPG, self).run(*args, **kwargs) - logger.warn(f"Running worker {self.name} listening to queues {self.queues}") + logger.info(f"Running worker {self.name} listening to queues {self.queues}") init = False while True: diff --git a/awx/main/scheduler/task_manager.py b/awx/main/scheduler/task_manager.py index ff48c5267c..6576d99829 100644 --- a/awx/main/scheduler/task_manager.py +++ b/awx/main/scheduler/task_manager.py @@ -239,7 +239,7 @@ class TaskManager: update_fields = ['status', 'start_args'] workflow_job.status = new_status if reason: - logger.info(reason) + logger.info(f'Workflow job {workflow_job.id} failed due to reason: {reason}') workflow_job.job_explanation = gettext_noop("No error handling paths found, marking workflow as failed") update_fields.append('job_explanation') workflow_job.start_args = '' # blank field to remove encrypted passwords diff --git a/awx/settings/development.py b/awx/settings/development.py index a8ef9535ae..015cda16f1 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -35,13 +35,6 @@ LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # LOGGING['handlers']['task_system'] = LOGGING['handlers']['console'].copy() # noqa COLOR_LOGS = True -# celery is annoyingly loud when docker containers start -LOGGING['loggers'].pop('celery', None) # noqa -# avoid awx.main.dispatch WARNING-level scaling worker up/down messages -LOGGING['loggers']['awx.main.dispatch']['level'] = 'ERROR' # noqa -# suppress the spamminess of the awx.main.scheduler and .tasks loggers -LOGGING['loggers']['awx']['level'] = 'INFO' # noqa - ALLOWED_HOSTS = ['*'] mimetypes.add_type("image/svg+xml", ".svg", True) @@ -57,13 +50,6 @@ CSRF_COOKIE_SECURE = False template = next((tpl_backend for tpl_backend in TEMPLATES if tpl_backend['NAME'] == 'default'), None) # noqa template['OPTIONS']['loaders'] = ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') -CALLBACK_QUEUE = "callback_tasks" - -# Enable dynamically pulling roles from a requirement.yml file -# when updating SCM projects -# Note: This setting may be overridden by database settings. -AWX_ROLES_ENABLED = True - # Disable Pendo on the UI for development/test. # Note: This setting may be overridden by database settings. PENDO_TRACKING_STATE = "off"