From 70c0c53dbffb5e9aaa51dabf9627c204facc1c18 Mon Sep 17 00:00:00 2001 From: Rudnei Bertol Junior Date: Thu, 16 Jan 2025 17:27:56 -0300 Subject: [PATCH] [AAP EDA] Collecting all log files from dir 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 --- sos/report/plugins/aap_eda.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sos/report/plugins/aap_eda.py b/sos/report/plugins/aap_eda.py index 6c7a018c97..851c6b5380 100644 --- a/sos/report/plugins/aap_eda.py +++ b/sos/report/plugins/aap_eda.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Rudnei Bertol Jr +# Copyright (c) 2025 Rudnei Bertol Jr # This file is part of the sos project: https://github.com/sosreport/sos # @@ -19,15 +19,18 @@ 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([ + "/var/log/ansible-automation-platform/eda/", + "/var/log/nginx/automationedacontroller.access.log*", + "/var/log/nginx/automationedacontroller.error.log*", + ]) + else: + self.add_copy_spec([ + "/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",