From 7aed9883e9a762f5877476ba93d0171482e4db65 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 | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sos/report/plugins/aap_eda.py b/sos/report/plugins/aap_eda.py index 6c7a018c97..7da276efc6 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,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",