Skip to content

Commit

Permalink
[AAP EDA] Collecting all log files from dir
Browse files Browse the repository at this point in the history
Changing the plugin to collect all log files from eda dir,
it will avoid missing log files added to the product
and not mapped at sos plugin.

Signed-off-by: Rudnei Bertol Junior <[email protected]>
  • Loading branch information
rbertol authored and TurboTurtle committed Jan 25, 2025
1 parent 3cfc75c commit 7aed988
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions sos/report/plugins/aap_eda.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Rudnei Bertol Jr <[email protected]>
# Copyright (c) 2025 Rudnei Bertol Jr <[email protected]>

# This file is part of the sos project: https://github.com/sosreport/sos
#
Expand All @@ -19,15 +19,20 @@ class AAPEDAControllerPlugin(Plugin, RedHatPlugin):
'automation-eda-controller-server')

def setup(self):
self.add_copy_spec([
"/etc/ansible-automation-platform/",
"/var/log/ansible-automation-platform/eda/worker.log*",
"/var/log/ansible-automation-platform/eda/scheduler.log*",
"/var/log/ansible-automation-platform/eda/gunicorn.log*",
"/var/log/ansible-automation-platform/eda/activation.log*",
"/var/log/nginx/automationedacontroller.access.log*",
"/var/log/nginx/automationedacontroller.error.log*",
])
if self.get_option("all_logs"):
self.add_copy_spec([
"/etc/ansible-automation-platform/",
"/var/log/ansible-automation-platform/eda/",
"/var/log/nginx/automationedacontroller.access.log*",
"/var/log/nginx/automationedacontroller.error.log*",
])
else:
self.add_copy_spec([
"/etc/ansible-automation-platform/",
"/var/log/ansible-automation-platform/eda/*.log",
"/var/log/nginx/automationedacontroller.access.log",
"/var/log/nginx/automationedacontroller.error.log",
])

self.add_forbidden_path([
"/etc/ansible-automation-platform/eda/SECRET_KEY",
Expand Down

0 comments on commit 7aed988

Please sign in to comment.