diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2020-05-02 17:22:35 +0200 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-05-05 16:35:11 -0400 |
commit | 943b3c3cd096f8efaeb4f0f2008391abe4c9f7e2 (patch) | |
tree | 444863edf30883aa7276cf72357c2399edebe087 | |
parent | ec5473573512284dfe84d7173f60c73799fe12df (diff) | |
download | sos-943b3c3cd096f8efaeb4f0f2008391abe4c9f7e2.tar.gz |
[containers_common] Add plugin for common containers configs
Move collection of whole /etc/containers and /usr/share/containers to
one containers_common plugin enabled by the package of the same name.
Since the package is a common dependency for buildah and podman, no regression
in default data collection happens.
Resolves: #2040
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/report/plugins/buildah.py | 7 | ||||
-rw-r--r-- | sos/report/plugins/containers_common.py | 27 | ||||
-rw-r--r-- | sos/report/plugins/podman.py | 7 |
3 files changed, 27 insertions, 14 deletions
diff --git a/sos/report/plugins/buildah.py b/sos/report/plugins/buildah.py index 9d237a53..4b8b3b0a 100644 --- a/sos/report/plugins/buildah.py +++ b/sos/report/plugins/buildah.py @@ -20,13 +20,6 @@ class Buildah(Plugin, RedHatPlugin): profiles = ('container',) def setup(self): - self.add_copy_spec([ - "/etc/containers/registries.conf", - "/etc/containers/storage.conf", - "/etc/containers/mounts.conf", - "/etc/containers/policy.json", - ]) - subcmds = [ 'containers', 'containers --all', diff --git a/sos/report/plugins/containers_common.py b/sos/report/plugins/containers_common.py new file mode 100644 index 00000000..99ae88fe --- /dev/null +++ b/sos/report/plugins/containers_common.py @@ -0,0 +1,27 @@ +# Copyright (C) 2020 Red Hat, Inc., Pavel Moravec <pmoravec@redhat.com> + +# 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 + + +class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): + + short_desc = 'Common container configs under {/etc,/usr/share}/containers' + plugin_name = 'containers_common' + profiles = ('container', ) + packages = ('containers-common', ) + + def setup(self): + self.add_copy_spec([ + '/etc/containers/*', + '/usr/share/containers/*', + ]) + +# vim: set et ts=4 sw=4 : diff --git a/sos/report/plugins/podman.py b/sos/report/plugins/podman.py index f6875197..f6632776 100644 --- a/sos/report/plugins/podman.py +++ b/sos/report/plugins/podman.py @@ -27,13 +27,6 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin): ] def setup(self): - self.add_copy_spec([ - "/etc/containers/registries.conf", - "/etc/containers/storage.conf", - "/etc/containers/mounts.conf", - "/etc/containers/policy.json", - ]) - self.add_env_var([ 'HTTP_PROXY', 'HTTPS_PROXY', |