Blame SOURCES/sos-bz1658937-ovirt_node-plugin.patch

fce3c4
From 0cddb4c820d39cae8bf6681c644fa353b0c20800 Mon Sep 17 00:00:00 2001
fce3c4
From: Nijin Ashok <nashok@redhat.com>
fce3c4
Date: Mon, 16 Jul 2018 14:42:43 +0530
fce3c4
Subject: [PATCH] [ovirt_node] New plugin for oVirt Node
fce3c4
fce3c4
oVirt Node is a small scaled down version used for hosting virtual
fce3c4
machines. The plugin collects node specific information like
fce3c4
upgrade log, the layer structure etc.
fce3c4
fce3c4
Resolves: #1381
fce3c4
fce3c4
Signed-off-by: Nijin Ashok nashok@redhat.com
fce3c4
Signed-off-by: Bryn M. Reeves bmr@redhat.com
fce3c4
---
fce3c4
 sos/plugins/ovirt_node.py | 41 +++++++++++++++++++++++++++++++++++++++
fce3c4
 1 file changed, 41 insertions(+)
fce3c4
 create mode 100644 sos/plugins/ovirt_node.py
fce3c4
fce3c4
diff --git a/sos/plugins/ovirt_node.py b/sos/plugins/ovirt_node.py
fce3c4
new file mode 100644
fce3c4
index 00000000..ccb5d3c6
fce3c4
--- /dev/null
fce3c4
+++ b/sos/plugins/ovirt_node.py
fce3c4
@@ -0,0 +1,41 @@
fce3c4
+# Copyright (C) 2018 Red Hat, Inc.,
fce3c4
+# This file is part of the sos project: https://github.com/sosreport/sos
fce3c4
+#
fce3c4
+# This copyrighted material is made available to anyone wishing to use,
fce3c4
+# modify, copy, or redistribute it subject to the terms and conditions of
fce3c4
+# version 2 of the GNU General Public License.
fce3c4
+#
fce3c4
+# See the LICENSE file in the source distribution for further information.
fce3c4
+
fce3c4
+from sos.plugins import Plugin, RedHatPlugin
fce3c4
+
fce3c4
+
fce3c4
+class OvirtNode(Plugin, RedHatPlugin):
fce3c4
+    """oVirt Node specific information"""
fce3c4
+
fce3c4
+    packages = (
fce3c4
+        'imgbased',
fce3c4
+        'ovirt-node-ng-nodectl',
fce3c4
+    )
fce3c4
+
fce3c4
+    plugin_name = 'ovirt_node'
fce3c4
+    profiles = ('virt',)
fce3c4
+
fce3c4
+    def setup(self):
fce3c4
+
fce3c4
+        # Add log files
fce3c4
+        self.add_copy_spec([
fce3c4
+            '/var/log/imgbased.log',
fce3c4
+            # Required for node versions < 4.2
fce3c4
+            '/tmp/imgbased.log',
fce3c4
+        ])
fce3c4
+
fce3c4
+        # Collect runtime info
fce3c4
+        self.add_cmd_output([
fce3c4
+            'imgbase layout',
fce3c4
+            'nodectl --machine-readable check',
fce3c4
+            'nodectl info',
fce3c4
+        ])
fce3c4
+
fce3c4
+
fce3c4
+# vim: expandtab tabstop=4 shiftwidth=4
fce3c4
-- 
fce3c4
2.17.2
fce3c4