Blame SOURCES/sos-bz1823488-containers-common.patch

a02485
From 943b3c3cd096f8efaeb4f0f2008391abe4c9f7e2 Mon Sep 17 00:00:00 2001
a02485
From: Pavel Moravec <pmoravec@redhat.com>
a02485
Date: Sat, 2 May 2020 17:22:35 +0200
a02485
Subject: [PATCH] [containers_common] Add plugin for common containers configs
a02485
a02485
Move collection of whole /etc/containers and /usr/share/containers to
a02485
one containers_common plugin enabled by the package of the same name.
a02485
a02485
Since the package is a common dependency for buildah and podman, no regression
a02485
in default data collection happens.
a02485
a02485
Resolves: #2040
a02485
a02485
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
a02485
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
a02485
---
a02485
 sos/plugins/buildah.py           |  7 -------
a02485
 sos/plugins/containers_common.py | 27 +++++++++++++++++++++++++
a02485
 sos/plugins/podman.py            |  7 -------
a02485
 3 files changed, 27 insertions(+), 14 deletions(-)
a02485
 create mode 100644 sos/plugins/containers_common.py
a02485
a02485
diff --git a/sos/plugins/buildah.py b/sos/plugins/buildah.py
a02485
index 9d237a53..4b8b3b0a 100644
a02485
--- a/sos/plugins/buildah.py
a02485
+++ b/sos/plugins/buildah.py
a02485
@@ -20,13 +20,6 @@ class Buildah(Plugin, RedHatPlugin):
a02485
     profiles = ('container',)
a02485
 
a02485
     def setup(self):
a02485
-        self.add_copy_spec([
a02485
-            "/etc/containers/registries.conf",
a02485
-            "/etc/containers/storage.conf",
a02485
-            "/etc/containers/mounts.conf",
a02485
-            "/etc/containers/policy.json",
a02485
-        ])
a02485
-
a02485
         subcmds = [
a02485
             'containers',
a02485
             'containers --all',
a02485
diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py
a02485
new file mode 100644
a02485
index 00000000..99ae88fe
a02485
--- /dev/null
a02485
+++ b/sos/plugins/containers_common.py
a02485
@@ -0,0 +1,27 @@
a02485
+# Copyright (C) 2020 Red Hat, Inc., Pavel Moravec <pmoravec@redhat.com>
a02485
+
a02485
+# This file is part of the sos project: https://github.com/sosreport/sos
a02485
+#
a02485
+# This copyrighted material is made available to anyone wishing to use,
a02485
+# modify, copy, or redistribute it subject to the terms and conditions of
a02485
+# version 2 of the GNU General Public License.
a02485
+#
a02485
+# See the LICENSE file in the source distribution for further information.
a02485
+
a02485
+from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
a02485
+
a02485
+
a02485
+class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin):
a02485
+
a02485
+    short_desc = 'Common container configs under {/etc,/usr/share}/containers'
a02485
+    plugin_name = 'containers_common'
a02485
+    profiles = ('container', )
a02485
+    packages = ('containers-common', )
a02485
+
a02485
+    def setup(self):
a02485
+        self.add_copy_spec([
a02485
+            '/etc/containers/*',
a02485
+            '/usr/share/containers/*',
a02485
+        ])
a02485
+
a02485
+# vim: set et ts=4 sw=4 :
a02485
diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py
a02485
index f6875197..f6632776 100644
a02485
--- a/sos/plugins/podman.py
a02485
+++ b/sos/plugins/podman.py
a02485
@@ -27,13 +27,6 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin):
a02485
     ]
a02485
 
a02485
     def setup(self):
a02485
-        self.add_copy_spec([
a02485
-            "/etc/containers/registries.conf",
a02485
-            "/etc/containers/storage.conf",
a02485
-            "/etc/containers/mounts.conf",
a02485
-            "/etc/containers/policy.json",
a02485
-        ])
a02485
-
a02485
         self.add_env_var([
a02485
             'HTTP_PROXY',
a02485
             'HTTPS_PROXY',
a02485
-- 
a02485
2.21.3
a02485