From 606962968c25b191af1906bf12f1f1290f879142 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Wed, 30 Aug 2017 13:00:27 +0200 Subject: [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 --- sos/plugins/ovirt_imageio.py | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sos/plugins/ovirt_imageio.py 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 + +# 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 -- cgit