diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-05-02 21:45:09 +0200 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2019-05-02 21:45:09 +0200 |
commit | 29822ee140dff925e2ae965fa2d458b87f10afe2 (patch) | |
tree | 06d1b87af7b4d2edbe113624439f59c4bf8a815f /tools/sosreport | |
parent | Merge pull request #3800 from AlanCoding/event_children_list (diff) | |
download | awx-29822ee140dff925e2ae965fa2d458b87f10afe2.tar.xz awx-29822ee140dff925e2ae965fa2d458b87f10afe2.zip |
don't collect data from other sosreport plugins
Tower plugin shouldn't collect data that other sosreport plugins collect.
Further, few code optimizations in calling sos API are made.
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Diffstat (limited to 'tools/sosreport')
-rw-r--r-- | tools/sosreport/tower.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/sosreport/tower.py b/tools/sosreport/tower.py index 70cf132207..66594ae10b 100644 --- a/tools/sosreport/tower.py +++ b/tools/sosreport/tower.py @@ -5,7 +5,6 @@ import sos from distutils.version import LooseVersion SOSREPORT_TOWER_COMMANDS = [ - "ansible --version", # ansible core version "awx-manage --version", # tower version "awx-manage list_instances", # tower cluster configuration "awx-manage run_dispatcher --status", # tower dispatch worker status @@ -23,15 +22,11 @@ SOSREPORT_TOWER_COMMANDS = [ SOSREPORT_TOWER_DIRS = [ "/etc/tower/", - "/etc/ansible/", "/etc/supervisord.d/", "/etc/nginx/", "/var/log/tower", "/var/log/nginx", "/var/log/supervisor", - "/var/log/syslog", - "/var/log/udev", - "/var/log/kern*", "/var/log/dist-upgrade", "/var/log/installer", "/var/log/unattended-upgrades", @@ -50,7 +45,7 @@ SOSREPORT_FORBIDDEN_PATHS = [ if LooseVersion(sos.__version__) >= LooseVersion('3.0'): from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin - class tower(Plugin, RedHatPlugin, UbuntuPlugin): + class Tower(Plugin, RedHatPlugin, UbuntuPlugin): '''Collect Ansible Tower related information''' plugin_name = "tower" @@ -59,16 +54,14 @@ if LooseVersion(sos.__version__) >= LooseVersion('3.0'): for path in SOSREPORT_TOWER_DIRS: self.add_copy_spec(path) - for path in SOSREPORT_FORBIDDEN_PATHS: - self.add_forbidden_path(path) + self.add_forbidden_path(SOSREPORT_FORBIDDEN_PATHS) - for command in SOSREPORT_TOWER_COMMANDS: - self.add_cmd_output(command) + self.add_cmd_output(SOSREPORT_TOWER_COMMANDS) else: import sos.plugintools - class tower(sos.plugintools.PluginBase): + class Tower(sos.plugintools.PluginBase): '''Collect Ansible Tower related information''' def setup(self): |