From 6013308e2ebfc45d72ef87c3d18fb2edce61d549 Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Thu, 9 Nov 2017 13:10:15 +0100
Subject: [PATCH] [opendaylight] new plugin for OpenDaylight
Collecting logs and configs.
Resolves: #1143
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/opendaylight.py | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 sos/plugins/opendaylight.py
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
new file mode 100644
index 00000000..33b4bdb3
--- /dev/null
+++ b/sos/plugins/opendaylight.py
@@ -0,0 +1,38 @@
+# 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 OpenDaylight(Plugin, RedHatPlugin):
+ """OpenDaylight network manager
+ """
+
+ plugin_name = 'opendaylight'
+ profiles = ('openstack', 'openstack_controller')
+
+ packages = ('opendaylight',)
+
+ def setup(self):
+ self.add_copy_spec("/opt/opendaylight/etc/")
+
+ self.limit = self.get_option("log_size")
+ if self.get_option("all_logs"):
+ self.add_copy_spec("/opt/opendaylight/data/log/",
+ sizelimit=self.limit)
+ else:
+ self.add_copy_spec("/opt/opendaylight/data/log/*log",
+ sizelimit=self.limit)
+
+# vim: set et ts=4 sw=4 :
--
2.13.6
From e7552dd922d262ad13441f050b5223aea68d44ac Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Thu, 9 Nov 2017 13:07:59 +0100
Subject: [PATCH] [openvswitch] collect few ovs-ofctl dumps and OVS list
Required for/by OpenDaylight.
Related to: #1143
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/openvswitch.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index b3bc4054..a137eda7 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -76,6 +76,8 @@ class OpenVSwitch(Plugin):
"ovs-appctl upcall/show",
# Capture DPDK and other parameters
"ovs-vsctl -t 5 get Open_vSwitch . other_config",
+ # Capture OVS list
+ "ovs-vsctl list Open_vSwitch",
# Capture DPDK datapath packet counters and config
"ovs-appctl dpctl/show -s",
# Capture DPDK queue to pmd mapping
@@ -126,6 +128,9 @@ class OpenVSwitch(Plugin):
for flow in flow_versions:
if flow in br_protos:
self.add_cmd_output([
+ "ovs-ofctl -O %s show %s" % (flow, br),
+ "ovs-ofctl -O %s dump-groups %s" % (flow, br),
+ "ovs-ofctl -O %s dump-group-stats %s" % (flow, br),
"ovs-ofctl -O %s dump-flows %s" % (flow, br),
"ovs-ofctl -O %s dump-ports-desc %s" % (flow, br)
])
--
2.13.6
From c68f2daf4751e0547743b207aa8e07b4df0759ab Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Tue, 6 Feb 2018 12:07:11 +0100
Subject: [PATCH] [opendaylight] Enable plugin by puppet-opendaylight package
Required for ODL running in a container.
Resolves: #1207
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/opendaylight.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
index 33b4bdb3..44e12b01 100644
--- a/sos/plugins/opendaylight.py
+++ b/sos/plugins/opendaylight.py
@@ -22,7 +22,7 @@ class OpenDaylight(Plugin, RedHatPlugin):
plugin_name = 'opendaylight'
profiles = ('openstack', 'openstack_controller')
- packages = ('opendaylight',)
+ packages = ('opendaylight', 'puppet-opendaylight')
def setup(self):
self.add_copy_spec("/opt/opendaylight/etc/")
--
2.13.6
From 86d0855b3c41c77b264b0076b128f22335897f7b Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Wed, 20 Dec 2017 12:13:30 +0100
Subject: [PATCH] [opendaylight] collect more logs and puppet config
collect puppet-generated config, container and docker logs
Resolves: #1171
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/opendaylight.py | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py
index 33b4bdb3d..cb9e1e85a 100644
--- a/sos/plugins/opendaylight.py
+++ b/sos/plugins/opendaylight.py
@@ -24,15 +24,26 @@ class OpenDaylight(Plugin, RedHatPlugin):
packages = ('opendaylight', 'puppet-opendaylight')
+ var_puppet_gen = "/var/lib/config-data/puppet-generated/opendaylight"
+
def setup(self):
- self.add_copy_spec("/opt/opendaylight/etc/")
+ self.add_copy_spec([
+ "/opt/opendaylight/etc/",
+ self.var_puppet_gen + "/opt/opendaylight/etc/",
+ ])
self.limit = self.get_option("log_size")
if self.get_option("all_logs"):
- self.add_copy_spec("/opt/opendaylight/data/log/",
- sizelimit=self.limit)
+ self.add_copy_spec([
+ "/opt/opendaylight/data/log/",
+ "/var/log/containers/opendaylight/",
+ ], sizelimit=self.limit)
else:
- self.add_copy_spec("/opt/opendaylight/data/log/*log",
- sizelimit=self.limit)
+ self.add_copy_spec([
+ "/opt/opendaylight/data/log/*.log*",
+ "/var/log/containers/opendaylight/*.log*",
+ ], sizelimit=self.limit)
+
+ self.add_cmd_output("docker logs opendaylight_api")
# vim: set et ts=4 sw=4 :