Change in vdsm[master]: distribute logrotate libvirtd configuration file with vdsm.

mtayer at redhat.com mtayer at redhat.com
Sun May 11 13:09:55 UTC 2014


mooli tayer has uploaded a new change for review.

Change subject: distribute logrotate libvirtd configuration file with vdsm.
......................................................................

distribute logrotate libvirtd configuration file with vdsm.

Change-Id: I98a0c4dd880727332d6ed2faeec0fe64d3835532
Signed-off-by: Mooli Tayer <mtayer at redhat.com>
---
M lib/vdsm/tool/Makefile.am
M lib/vdsm/tool/configurator.py
A lib/vdsm/tool/libvirtd
M vdsm.spec.in
4 files changed, 24 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/27564/1

diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am
index 7418d59..c372d7f 100644
--- a/lib/vdsm/tool/Makefile.am
+++ b/lib/vdsm/tool/Makefile.am
@@ -19,6 +19,12 @@
 #
 include $(top_srcdir)/build-aux/Makefile.subs
 
+toolfilesdir=$(pkgdatadir)/tool
+
+dist_toolfiles_DATA= \
+    libvirtd \
+    $(NULL)
+
 EXTRA_DIST = \
 	load_needed_modules.py.in \
 	validate_ovirt_certs.py.in \
diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index cf86da6..d316cbb 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -34,7 +34,7 @@
 from configfile import ConfigFile, ParserWrapper
 from ..constants import QEMU_PROCESS_GROUP, \
     SANLOCK_USER, VDSM_GROUP, SYSCONF_PATH, P_VDSM_CERT, \
-    SANLOCK_ENABLED, LIBVIRT_SELINUX
+    SANLOCK_ENABLED, LIBVIRT_SELINUX, P_VDSM
 from vdsm.config import config
 
 
@@ -221,19 +221,6 @@
         },
     ]
 
-    LLOGR_CONF = (
-        '/var/log/libvirt/libvirtd.log {'
-        '    rotate 100'
-        '    missingok'
-        '    copytruncate'
-        '    size 15M'
-        '    compress'
-        '    compresscmd /usr/bin/xz'
-        '    uncompresscmd /usr/bin/unxz'
-        '    compressext .xz'
-        '}'
-    )
-
     def __init__(self):
         super(LibvirtModuleConfigure, self).__init__()
 
@@ -309,6 +296,11 @@
         with ConfigFile(
                 self.envGet('LRCONF'), **VDSM_CONF_SECTION) as conf:
             conf.prefixLines('# VDSM backup')
+            with open(os.path.join(
+                    P_VDSM,
+                    'tool',
+                    'libvirtd'), 'r') as lloger_conf:
+                            conf.prependSection(lloger_conf.read())
             conf.prependSection(self.LLOGR_CONF)
 
         if utils.isOvirtNode():
diff --git a/lib/vdsm/tool/libvirtd b/lib/vdsm/tool/libvirtd
new file mode 100644
index 0000000..8d9dfd8
--- /dev/null
+++ b/lib/vdsm/tool/libvirtd
@@ -0,0 +1,10 @@
+/var/log/libvirt/libvirtd.log {
+    rotate 100
+    missingok
+    copytruncate
+    size 15M
+    compress
+    compresscmd /usr/bin/xz
+    uncompresscmd /usr/bin/unxz
+    compressext .xz
+}
diff --git a/vdsm.spec.in b/vdsm.spec.in
index e6a065e..90b9fe1 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -941,6 +941,8 @@
 %{_datadir}/%{vdsm_name}/virt/vmexitreason.py*
 %{_datadir}/%{vdsm_name}/virt/vmpowerdown.py*
 %{_datadir}/%{vdsm_name}/virt/sampling.py*
+%{_datadir}/%{vdsm_name}/tool
+%{_datadir}/%{vdsm_name}/tool/libvirtd
 
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf


-- 
To view, visit http://gerrit.ovirt.org/27564
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98a0c4dd880727332d6ed2faeec0fe64d3835532
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer at redhat.com>


More information about the vdsm-patches mailing list