Blame SOURCES/sos-bz1483414-opendaylight-plugin.patch

7b9b39
From 6013308e2ebfc45d72ef87c3d18fb2edce61d549 Mon Sep 17 00:00:00 2001
7b9b39
From: Pavel Moravec <pmoravec@redhat.com>
7b9b39
Date: Thu, 9 Nov 2017 13:10:15 +0100
7b9b39
Subject: [PATCH] [opendaylight] new plugin for OpenDaylight
7b9b39
7b9b39
Collecting logs and configs.
7b9b39
7b9b39
Resolves: #1143
7b9b39
7b9b39
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
7b9b39
---
7b9b39
 sos/plugins/opendaylight.py | 38 ++++++++++++++++++++++++++++++++++++++
7b9b39
 1 file changed, 38 insertions(+)
7b9b39
 create mode 100644 sos/plugins/opendaylight.py
7b9b39
7b9b39
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
7b9b39
new file mode 100644
7b9b39
index 00000000..33b4bdb3
7b9b39
--- /dev/null
7b9b39
+++ b/sos/plugins/opendaylight.py
7b9b39
@@ -0,0 +1,38 @@
7b9b39
+# This program is free software; you can redistribute it and/or modify
7b9b39
+# it under the terms of the GNU General Public License as published by
7b9b39
+# the Free Software Foundation; either version 2 of the License, or
7b9b39
+# (at your option) any later version.
7b9b39
+
7b9b39
+# This program is distributed in the hope that it will be useful,
7b9b39
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
7b9b39
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7b9b39
+# GNU General Public License for more details.
7b9b39
+
7b9b39
+# You should have received a copy of the GNU General Public License along
7b9b39
+# with this program; if not, write to the Free Software Foundation, Inc.,
7b9b39
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
7b9b39
+
7b9b39
+from sos.plugins import Plugin, RedHatPlugin
7b9b39
+
7b9b39
+
7b9b39
+class OpenDaylight(Plugin, RedHatPlugin):
7b9b39
+    """OpenDaylight network manager
7b9b39
+    """
7b9b39
+
7b9b39
+    plugin_name = 'opendaylight'
7b9b39
+    profiles = ('openstack', 'openstack_controller')
7b9b39
+
7b9b39
+    packages = ('opendaylight',)
7b9b39
+
7b9b39
+    def setup(self):
7b9b39
+        self.add_copy_spec("/opt/opendaylight/etc/")
7b9b39
+
7b9b39
+        self.limit = self.get_option("log_size")
7b9b39
+        if self.get_option("all_logs"):
7b9b39
+            self.add_copy_spec("/opt/opendaylight/data/log/",
7b9b39
+                               sizelimit=self.limit)
7b9b39
+        else:
7b9b39
+            self.add_copy_spec("/opt/opendaylight/data/log/*log",
7b9b39
+                               sizelimit=self.limit)
7b9b39
+
7b9b39
+# vim: set et ts=4 sw=4 :
7b9b39
-- 
7b9b39
2.13.6
7b9b39
7b9b39
From e7552dd922d262ad13441f050b5223aea68d44ac Mon Sep 17 00:00:00 2001
7b9b39
From: Pavel Moravec <pmoravec@redhat.com>
7b9b39
Date: Thu, 9 Nov 2017 13:07:59 +0100
7b9b39
Subject: [PATCH] [openvswitch] collect few ovs-ofctl dumps and OVS list
7b9b39
7b9b39
Required for/by OpenDaylight.
7b9b39
7b9b39
Related to: #1143
7b9b39
7b9b39
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
7b9b39
---
7b9b39
 sos/plugins/openvswitch.py | 5 +++++
7b9b39
 1 file changed, 5 insertions(+)
7b9b39
7b9b39
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
7b9b39
index b3bc4054..a137eda7 100644
7b9b39
--- a/sos/plugins/openvswitch.py
7b9b39
+++ b/sos/plugins/openvswitch.py
7b9b39
@@ -76,6 +76,8 @@ class OpenVSwitch(Plugin):
7b9b39
             "ovs-appctl upcall/show",
7b9b39
             # Capture DPDK and other parameters
7b9b39
             "ovs-vsctl -t 5 get Open_vSwitch . other_config",
7b9b39
+            # Capture OVS list
7b9b39
+            "ovs-vsctl list Open_vSwitch",
7b9b39
             # Capture DPDK datapath packet counters and config
7b9b39
             "ovs-appctl dpctl/show -s",
7b9b39
             # Capture DPDK queue to pmd mapping
7b9b39
@@ -126,6 +128,9 @@ class OpenVSwitch(Plugin):
7b9b39
                 for flow in flow_versions:
7b9b39
                     if flow in br_protos:
7b9b39
                         self.add_cmd_output([
7b9b39
+                            "ovs-ofctl -O %s show %s" % (flow, br),
7b9b39
+                            "ovs-ofctl -O %s dump-groups %s" % (flow, br),
7b9b39
+                            "ovs-ofctl -O %s dump-group-stats %s" % (flow, br),
7b9b39
                             "ovs-ofctl -O %s dump-flows %s" % (flow, br),
7b9b39
                             "ovs-ofctl -O %s dump-ports-desc %s" % (flow, br)
7b9b39
                         ])
7b9b39
-- 
7b9b39
2.13.6
7b9b39
7b9b39
From c68f2daf4751e0547743b207aa8e07b4df0759ab Mon Sep 17 00:00:00 2001
7b9b39
From: Pavel Moravec <pmoravec@redhat.com>
7b9b39
Date: Tue, 6 Feb 2018 12:07:11 +0100
7b9b39
Subject: [PATCH] [opendaylight] Enable plugin by puppet-opendaylight package
7b9b39
7b9b39
Required for ODL running in a container.
7b9b39
7b9b39
Resolves: #1207
7b9b39
7b9b39
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
7b9b39
---
7b9b39
 sos/plugins/opendaylight.py | 2 +-
7b9b39
 1 file changed, 1 insertion(+), 1 deletion(-)
7b9b39
7b9b39
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
7b9b39
index 33b4bdb3..44e12b01 100644
7b9b39
--- a/sos/plugins/opendaylight.py
7b9b39
+++ b/sos/plugins/opendaylight.py
7b9b39
@@ -22,7 +22,7 @@ class OpenDaylight(Plugin, RedHatPlugin):
7b9b39
     plugin_name = 'opendaylight'
7b9b39
     profiles = ('openstack', 'openstack_controller')
7b9b39
7b9b39
-    packages = ('opendaylight',)
7b9b39
+    packages = ('opendaylight', 'puppet-opendaylight')
7b9b39
7b9b39
     def setup(self):
7b9b39
         self.add_copy_spec("/opt/opendaylight/etc/")
7b9b39
-- 
7b9b39
2.13.6
7b9b39
7b9b39
From 86d0855b3c41c77b264b0076b128f22335897f7b Mon Sep 17 00:00:00 2001
7b9b39
From: Pavel Moravec <pmoravec@redhat.com>
7b9b39
Date: Wed, 20 Dec 2017 12:13:30 +0100
7b9b39
Subject: [PATCH] [opendaylight] collect more logs and puppet config
7b9b39
7b9b39
collect puppet-generated config, container and docker logs
7b9b39
7b9b39
Resolves: #1171
7b9b39
7b9b39
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
7b9b39
---
7b9b39
 sos/plugins/opendaylight.py | 21 ++++++++++++++++-----
7b9b39
 1 file changed, 16 insertions(+), 5 deletions(-)
7b9b39
7b9b39
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
7b9b39
index 33b4bdb3d..cb9e1e85a 100644
7b9b39
--- a/sos/plugins/opendaylight.py
7b9b39
+++ b/sos/plugins/opendaylight.py
7b9b39
@@ -24,15 +24,26 @@ class OpenDaylight(Plugin, RedHatPlugin):
7b9b39
 
7b9b39
     packages = ('opendaylight', 'puppet-opendaylight')
7b9b39
 
7b9b39
+    var_puppet_gen = "/var/lib/config-data/puppet-generated/opendaylight"
7b9b39
+
7b9b39
     def setup(self):
7b9b39
-        self.add_copy_spec("/opt/opendaylight/etc/")
7b9b39
+        self.add_copy_spec([
7b9b39
+            "/opt/opendaylight/etc/",
7b9b39
+            self.var_puppet_gen + "/opt/opendaylight/etc/",
7b9b39
+        ])
7b9b39
 
7b9b39
         self.limit = self.get_option("log_size")
7b9b39
         if self.get_option("all_logs"):
7b9b39
-            self.add_copy_spec("/opt/opendaylight/data/log/",
7b9b39
-                               sizelimit=self.limit)
7b9b39
+            self.add_copy_spec([
7b9b39
+                "/opt/opendaylight/data/log/",
7b9b39
+                "/var/log/containers/opendaylight/",
7b9b39
+            ], sizelimit=self.limit)
7b9b39
         else:
7b9b39
-            self.add_copy_spec("/opt/opendaylight/data/log/*log",
7b9b39
-                               sizelimit=self.limit)
7b9b39
+            self.add_copy_spec([
7b9b39
+                "/opt/opendaylight/data/log/*.log*",
7b9b39
+                "/var/log/containers/opendaylight/*.log*",
7b9b39
+            ], sizelimit=self.limit)
7b9b39
+
7b9b39
+        self.add_cmd_output("docker logs opendaylight_api")
7b9b39
 
7b9b39
 # vim: set et ts=4 sw=4 :