A set of tools to gather troubleshooting information from a system
6857201d8e4fa2b6feae5fa38b83eac4d899d939..b131c3b47fc47d530b4c5ef6eb072d09a2882693
2018-05-14 CentOS Sources
debrand sos-3.5-7.el7_5
b131c3 diff | tree
2018-05-14 CentOS Sources
import sos-3.5-7.el7_5
789f54 diff | tree
3 files added
1 files modified
296 ■■■■■ changed files
SOURCES/sos-bz1568882-openstack-octavia-plugin.patch 136 ●●●●● patch | view | raw | blame | history
SOURCES/sos-bz1568884-kernel-dont-collect-timer.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/sos-bz1568960-ovirt-provider-ovn.patch 70 ●●●●● patch | view | raw | blame | history
SPECS/sos.spec 21 ●●●● patch | view | raw | blame | history
SOURCES/sos-bz1568882-openstack-octavia-plugin.patch
New file
@@ -0,0 +1,136 @@
From 188b8b70ea5790af3fe1ca9fc7eea28e83a149a6 Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Mon, 2 Apr 2018 15:18:22 +0200
Subject: [PATCH] [openstack_octavia] Add new plugin
This adds a plugin for OpenStack Octavia as a network load balancing.
Resolves: #1257
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/openstack_octavia.py | 111 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)
 create mode 100644 sos/plugins/openstack_octavia.py
diff --git a/sos/plugins/openstack_octavia.py b/sos/plugins/openstack_octavia.py
new file mode 100644
index 00000000..43bf322a
--- /dev/null
+++ b/sos/plugins/openstack_octavia.py
@@ -0,0 +1,111 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class OpenStackOctavia(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+    """Openstack Octavia"""
+
+    plugin_name = "openstack_octavia"
+    profiles = ('openstack', 'openstack_controller')
+    packages = ('openstack-octavia-common',)
+
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/octavia"
+
+    def setup(self):
+        # configs
+        self.add_copy_spec([
+            "/etc/sysconfig/network-scripts/ifcfg-o-hm0",
+            "/etc/logrotate.d/openstack-octavia",
+            "/etc/octavia/*",
+            "/var/lib/octavia",
+            self.var_puppet_gen + "/etc/octavia/conf.d",
+            self.var_puppet_gen + "/etc/octavia/octavia.conf",
+            self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf",
+        ])
+
+        # don't collect certificates
+        self.add_forbidden_path("/etc/octavia/certs/")
+
+        # logs
+        self.limit = self.get_option("log_size")
+        if self.get_option("all_logs"):
+            self.add_copy_spec([
+                "/var/log/containers/httpd/octavia-api/*",
+                "/var/log/containers/octavia/*",
+                "/var/log/octavia/*",
+            ], sizelimit=self.limit)
+        else:
+            self.add_copy_spec([
+                "/var/log/containers/httpd/octavia-api/*.log",
+                "/var/log/containers/octavia/*.log",
+                "/var/log/octavia/*.log",
+            ], sizelimit=self.limit)
+
+        # commands
+        self.add_cmd_output([
+            "openstack loadbalancer list",
+            "openstack loadbalancer amphora list",
+            "openstack loadbalancer healthmonitor list",
+            "openstack loadbalancer l7policy list",
+            "openstack loadbalancer listener list",
+            "openstack loadbalancer pool list",
+            "openstack loadbalancer quota list",
+        ])
+
+        # get details from each loadbalancer
+        cmd = "openstack loadbalancer list -f value -c id"
+        loadbalancers = self.call_ext_prog(cmd)['output']
+        for loadbalancer in loadbalancers.splitlines():
+            loadbalancer = loadbalancer.split()[0]
+            self.add_cmd_output(
+                "openstack loadbalancer show %s" % (loadbalancer)
+            )
+
+        # get details from each l7policy
+        cmd = "openstack loadbalancer l7policy list -f value -c id"
+        l7policies = self.call_ext_prog(cmd)['output']
+        for l7policy in l7policies.splitlines():
+            l7policy = l7policy.split()[0]
+            self.add_cmd_output(
+                "openstack loadbalancer l7rule list %s" % (l7policy)
+            )
+
+        # get details from each pool
+        cmd = "openstack loadbalancer pool list -f value -c id"
+        pools = self.call_ext_prog(cmd)['output']
+        for pool in pools.splitlines():
+            pool = pool.split()[0]
+            self.add_cmd_output(
+                "openstack loadbalancer member list %s" % (pool)
+            )
+
+        if self.get_option("verify"):
+            self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
+
+    def postproc(self):
+        protect_keys = [
+            "ca_private_key_passphrase", "heartbeat_key", "password",
+            "connection"
+        ]
+        regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
+
+        self.do_path_regex_sub("/etc/octavia/*", regexp, r"\1*********")
+        self.do_path_regex_sub(
+            self.var_puppet_gen + "/etc/octavia/*",
+            regexp, r"\1*********"
+        )
+
+# vim: set et ts=4 sw=4 :
--
2.13.6
SOURCES/sos-bz1568884-kernel-dont-collect-timer.patch
New file
@@ -0,0 +1,69 @@
From 04dce26bd12888b924425beefa449a07b683021a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
Date: Fri, 13 Apr 2018 09:24:30 +0200
Subject: [PATCH] [kernel] Disable gathering /proc/timer* statistics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable gathering /proc/timer* statistics by default, a new option
'kernel.with-timer' enables gathering these.
If /proc/timer_list is huge, then kernel will experience issues with
processing all the timers since it needs to spin in a tight loop inside
the kernel.
We have tried to fix it from kernel side, added touch_nmi_watchdog() to
silence softlockups, cond_resched() to fix RCU stall issue but with such
huge number of timers the RHEL7 kernel is still hangs.
It can reproduced somehow on upstream kernel (however, there will be
workqueue lockups).
We came to conclusion that reading /proc/timer_list should be disabled
in sosreport. Since /proc/timer_stats is tight to /proc/timer_list, both
are disabled at the same time.
Resolves: #1268
Signed-off-by: Renaud M├ętrich <rmetrich@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/kernel.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
index 97ef7862..6c2f509c 100644
--- a/sos/plugins/kernel.py
+++ b/sos/plugins/kernel.py
@@ -27,6 +27,10 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
     sys_module = '/sys/module'
+    option_list = [
+        ("with-timer", "gather /proc/timer* statistics", "slow", False)
+    ]
+
     def setup(self):
         # compat
         self.add_cmd_output("uname -a", root_symlink="uname")
@@ -83,7 +87,6 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
             "/proc/driver",
             "/proc/sys/kernel/tainted",
             "/proc/softirqs",
-            "/proc/timer*",
             "/proc/lock*",
             "/proc/misc",
             "/var/log/dmesg",
@@ -92,4 +95,9 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
             clocksource_path + "current_clocksource"
         ])
+        if self.get_option("with-timer"):
+            # This can be very slow, depending on the number of timers,
+            # and may also cause softlockups
+            self.add_copy_spec("/proc/timer*")
+
 # vim: set et ts=4 sw=4 :
--
2.13.6
SOURCES/sos-bz1568960-ovirt-provider-ovn.patch
New file
@@ -0,0 +1,70 @@
From 523cdb9393059534f97b5b249498aca67c2c45d6 Mon Sep 17 00:00:00 2001
From: Leon Goldberg <lgoldber@redhat.com>
Date: Sun, 25 Feb 2018 17:01:11 +0200
Subject: [PATCH] [ovirt-provider-ovn] Introducing a plugin for
 ovirt-provider-ovn.
Resolves: #1227.
Signed-off-by: Leon Goldberg <leon.otium@gmail.com>
Fixed member formatting & added VIM mode line.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/ovirt_provider_ovn.py | 43 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 sos/plugins/ovirt_provider_ovn.py
diff --git a/sos/plugins/ovirt_provider_ovn.py b/sos/plugins/ovirt_provider_ovn.py
new file mode 100644
index 00000000..a075509e
--- /dev/null
+++ b/sos/plugins/ovirt_provider_ovn.py
@@ -0,0 +1,43 @@
+# Copyright (C) 2018 Red Hat, Inc.,
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+from sos.plugins import Plugin, RedHatPlugin
+
+
+class OvirtProviderOvn(Plugin, RedHatPlugin):
+    """oVirt OVN Provider
+    """
+
+    packages = ('ovirt-provider-ovn',)
+    plugin_name = 'ovirt_provider_ovn'
+    profiles = ('virt',)
+
+    provider_conf = '/etc/ovirt-provider-ovn/ovirt-provider-ovn.conf'
+
+    def setup(self):
+        self.add_copy_spec(self.provider_conf)
+        self.add_copy_spec('/etc/ovirt-provider-ovn/conf.d/*')
+
+        spec = '/var/log/ovirt-provider-ovn.log'
+        if self.get_option('all_logs'):
+            spec += '*'
+        self.add_copy_spec(spec, sizelimit=self.get_option('log_size'))
+
+    def postproc(self):
+        self.do_file_sub(self.provider_conf,
+                         r'(ovirt-sso-client-secret\s*=\s*)(.*)',
+                         r'\1*************')
+
+# vim: set et ts=4 sw=4 :
--
2.13.6
SPECS/sos.spec
@@ -2,7 +2,7 @@
Summary: A set of tools to gather troubleshooting information from a system
Name: sos
Version: 3.5
Release: 6%{?dist}
Release: 7%{?dist}
Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz
License: GPLv2+
@@ -29,7 +29,11 @@
Patch10: sos-bz1539038-etcd-private-keys.patch
Patch11: sos-bz1535390-ipa-logs.patch
Patch12: sos-bz1525620-rabbitmq-osp12-containerized.patch
Patch13: sos-centos-branding.patch
Patch13: sos-bz1568960-ovirt-provider-ovn.patch
Patch14: sos-bz1568884-kernel-dont-collect-timer.patch
Patch15: sos-bz1568882-openstack-octavia-plugin.patch
Patch16: sos-centos-branding.patch
%description
Sos is a set of tools that gathers information about system
@@ -53,6 +57,9 @@
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%build
make
@@ -76,9 +83,17 @@
%config(noreplace) %{_sysconfdir}/sos.conf
%changelog
* Tue Apr 10 2018 CentOS Sources <bugs@centos.org> - 3.5-6.el7.centos
* Mon May 14 2018 CentOS Sources <bugs@centos.org> - 3.5-7.el7.centos
- Roll in CentOS Branding
* Wed Apr 18 2018 Pavel Moravec <pmoravec@redhat.com> = 3.5-7
- [kernel] Disable gathering /proc/timer* statistics
  Resolves: bz1568884
- [openstack_octavia] Add new plugin
  Resolves: bz1568882
- [ovirt-provider-ovn] A new plugin
  Resolves: bz1568960
* Tue Feb 13 2018 Pavel Moravec <pmoravec@redhat.com> = 3.5-6
- [ipa] set ipa_version variable before referencing it
  Resolves: bz1535390