Yaniv Bronhaim has uploaded a new change for review.
Change subject: Moving vdsm-logrotate config under vdsm conf dir
......................................................................
Moving vdsm-logrotate config under vdsm conf dir
The outcome of putting the conf under logrotate.d was daily run of
logrotate that specified in logrotate.conf which runs the logrotate.d
scripts. Moving it under vdsm conf dir will allow to use only cron job
for the rotation without system intervention.
Change-Id: Ic5b5376f682b159a3965ce00421ccd0ac0e0f9f7
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1113264
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M debian/vdsm.install
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/vdsm-logrotate
4 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/29624/1
diff --git a/debian/vdsm.install b/debian/vdsm.install
index edc3faa..d9d513d 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -4,7 +4,6 @@
./etc/init/supervdsmd.conf
./etc/init/vdsm-tmpfiles.conf
./etc/init/vdsmd.conf
-./etc/logrotate.d/vdsm
./etc/ovirt-config-boot.d/vdsm-config
./etc/pki/vdsm/keys/libvirt_password
./etc/rwtab.d/vdsm
@@ -12,6 +11,7 @@
./etc/sudoers.d/50_vdsm
./etc/sysctl.d/vdsm.conf
./etc/vdsm/logger.conf
+./etc/vdsm/logrotate/vdsm
./etc/vdsm/mom.conf
./etc/vdsm/mom.d/00-defines.policy
./etc/vdsm/mom.d/01-parameters.policy
diff --git a/vdsm.spec.in b/vdsm.spec.in
index dfca5bd..6a8e860 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -952,7 +952,7 @@
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy
-%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm
+%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm
%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm
%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf
%if 0%{?with_systemd}
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 6016328..96deef2 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -195,9 +195,9 @@
$(RM) $(DESTDIR)$(sysconfdir)/rwtab.d/vdsm
install-data-logrotate:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/logrotate.d
+ $(MKDIR_P) $(DESTDIR)$(vdsmconfdir)/logrotate
$(INSTALL_DATA) $(builddir)/vdsm-logrotate.conf \
- $(DESTDIR)$(sysconfdir)/logrotate.d/vdsm
+ $(DESTDIR)$(vdsmconfdir)/logrotate/vdsm
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/cron.hourly
$(INSTALL_SCRIPT) $(srcdir)/vdsm-logrotate \
$(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-logrotate
@@ -206,7 +206,7 @@
$(DESTDIR)$(sysconfdir)/cron.d/vdsm-libvirt-logrotate
uninstall-data-logrotate:
- $(RM) $(DESTDIR)$(sysconfdir)/logrotate.d/vdsm
+ $(RM) $(DESTDIR)$(vdsmconfdir)/logrotate/vdsm
$(RM) $(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-logrotate
$(RM) $(DESTDIR)$(sysconfdir)/cron.d/vdsm-libvirt-logrotate
diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index 98767ba..e2027ac 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -1,6 +1,6 @@
#!/bin/sh
-/usr/sbin/logrotate /etc/logrotate.d/vdsm
+/usr/sbin/logrotate /etc/vdsm/logrotate/vdsm
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
--
To view, visit
http://gerrit.ovirt.org/29624
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5b5376f682b159a3965ce00421ccd0ac0e0f9f7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>