From 4277b7343875079310f3a53001d8e6d85b9b63fa Mon Sep 17 00:00:00 2001 From: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:34:45 -0400 Subject: [PATCH] Adding /etc/supervisord.conf to sosreports (#12104) --- tools/sosreport/TESTING.md | 18 ++++++++++++++++++ tools/sosreport/controller.py | 7 ++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 tools/sosreport/TESTING.md diff --git a/tools/sosreport/TESTING.md b/tools/sosreport/TESTING.md new file mode 100644 index 0000000000..3e4debc586 --- /dev/null +++ b/tools/sosreport/TESTING.md @@ -0,0 +1,18 @@ +Create a RHEL box and then do the following. +```bash +sudo mkdir -p /usr/share/sosreport/sos/plugins +sudo yum install sos +cp controller.py /usr/share/sosreport/sos/plugins +sudo chmod 644 /usr/share/sosreport/sos/plugins/controller.py +ln -s /usr/share/sosreport/sos/plugins/controller.py `find `find /usr/lib -name sos` -name plugins` +sosreport -l | grep controller +``` + +The results should be: +```bash +# sosreport -l | grep controller + controller Ansible Automation Platform controller information +``` + +To run only the controller plugin run: `sosreport --only-plugins controller` + diff --git a/tools/sosreport/controller.py b/tools/sosreport/controller.py index a6ded19db4..3e28eb5b79 100644 --- a/tools/sosreport/controller.py +++ b/tools/sosreport/controller.py @@ -22,15 +22,16 @@ SOSREPORT_CONTROLLER_COMMANDS = [ "ls -ll /var/lib/awx", # check permissions "ls -ll /var/lib/awx/venv", # list all venvs "ls -ll /etc/tower", - "ls -ll /var/run/awx-receptor", # list contents of dirctory where receptor socket should be + "ls -ll /var/run/awx-receptor", # list contents of dirctory where receptor socket should be "ls -ll /etc/receptor", - "receptorctl --socket /var/run/awx-receptor/receptor.sock status", # Get information about the status of the mesh + "receptorctl --socket /var/run/awx-receptor/receptor.sock status", # Get information about the status of the mesh "umask -p", # check current umask ] SOSREPORT_CONTROLLER_DIRS = [ "/etc/tower/", "/etc/receptor/", + "/etc/supervisord.conf", "/etc/supervisord.d/", "/etc/nginx/", "/var/log/tower", @@ -54,7 +55,7 @@ SOSREPORT_FORBIDDEN_PATHS = [ "/etc/tower/awx.cert", "/var/log/tower/profile", "/etc/receptor/tls/ca/*.key", - "/etc/receptor/tls/*.key" + "/etc/receptor/tls/*.key", ]