From 3fbc63e2a9f28c1e5554651b5c7b9d2a4c5c61a8 Mon Sep 17 00:00:00 2001 From: Varsha Teratipally Date: Fri, 26 Aug 2022 14:28:30 +0000 Subject: add crio plugin support for Cos Signed-off-by: Varsha Teratipally --- sos/report/plugins/containerd.py | 29 +++++++++++++++++++++++++++++ sos/report/plugins/crio.py | 4 ++-- sos/report/plugins/docker.py | 1 - 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 sos/report/plugins/containerd.py diff --git a/sos/report/plugins/containerd.py b/sos/report/plugins/containerd.py new file mode 100644 index 00000000..1977fe22 --- /dev/null +++ b/sos/report/plugins/containerd.py @@ -0,0 +1,29 @@ +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +from sos.report.plugins import (Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin) + + +class Containerd(Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin): + + short_desc = 'Containerd containers' + plugin_name = 'containerd' + profiles = ('container',) + packages = ('containerd',) + + def setup(self): + self.add_copy_spec([ + "/etc/containerd/", + ]) + + self.add_cmd_output('containerd config dump') + + # collect the containerd logs. + self.add_journal(units='containerd') + +# vim: set et ts=4 sw=4 : diff --git a/sos/report/plugins/crio.py b/sos/report/plugins/crio.py index 17b016d8..97be87c4 100644 --- a/sos/report/plugins/crio.py +++ b/sos/report/plugins/crio.py @@ -9,10 +9,10 @@ # See the LICENSE file in the source distribution for further information. from sos.report.plugins import (Plugin, RedHatPlugin, UbuntuPlugin, - SoSPredicate, PluginOpt) + SoSPredicate, PluginOpt, CosPlugin) -class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): +class CRIO(Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin): short_desc = 'CRI-O containers' plugin_name = 'crio' diff --git a/sos/report/plugins/docker.py b/sos/report/plugins/docker.py index bb569b3b..879bcd99 100644 --- a/sos/report/plugins/docker.py +++ b/sos/report/plugins/docker.py @@ -135,7 +135,6 @@ class UbuntuDocker(Docker, UbuntuPlugin): def setup(self): super(UbuntuDocker, self).setup() self.add_copy_spec([ - "/etc/containerd/", "/etc/default/docker", "/run/docker/libcontainerd/containerd/events.log" ]) -- cgit