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

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