aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2017-08-30 13:00:27 +0200
committerBryn M. Reeves <bmr@redhat.com>2017-10-20 16:42:28 +0100
commit606962968c25b191af1906bf12f1f1290f879142 (patch)
tree1884b73b63c645207c930f6f845b4c8424b6e8b2
parent5e7dfe079749748e2b57ed7047fd059c07dc9dbb (diff)
downloadsos-606962968c25b191af1906bf12f1f1290f879142.tar.gz
[ovirt_imageio] New plugin for oVirt Image I/O
Colecting logs and configs for the daemon and its proxy. Resolves: #1080 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/ovirt_imageio.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/sos/plugins/ovirt_imageio.py b/sos/plugins/ovirt_imageio.py
new file mode 100644
index 00000000..42e14e1f
--- /dev/null
+++ b/sos/plugins/ovirt_imageio.py
@@ -0,0 +1,51 @@
+# Copyright (C) 2014 Red Hat, Inc., Sandro Bonazzola <sbonazzo@redhat.com>
+
+# 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.
+
+
+import glob
+
+
+from sos.plugins import Plugin, RedHatPlugin
+
+
+class OvirtImageIO(Plugin, RedHatPlugin):
+ """oVirt Image I/O Daemon / Proxy"""
+
+ packages = (
+ 'ovirt-imageio-daemon',
+ 'ovirt-imageio-proxy',
+ )
+
+ plugin_name = 'ovirt_imageio'
+ profiles = ('virt',)
+
+ def setup(self):
+ self.limit = self.get_option('log_size')
+
+ # Add configuration files
+ self.add_copy_spec([
+ '/etc/ovirt-imageio-daemon/logger.conf',
+ '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf',
+ ])
+
+ # Add log files
+ self.add_copy_spec([
+ '/var/log/ovirt-imageio-proxy/image-proxy.log*',
+ '/var/log/ovirt-imageio-daemon/daemon.log*',
+ ], sizelimit=self.limit)
+
+
+# vim: expandtab tabstop=4 shiftwidth=4