]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
packaging: add logrotate config
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 19 Mar 2014 10:32:07 +0000 (03:32 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sat, 22 Mar 2014 12:14:31 +0000 (05:14 -0700)
There's no need to signal running agents since they use
a WatchedFileHandler that detects rotation itself.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
debian/rules
logrotate.conf [new file with mode: 0644]
radosgw-agent.spec

index 7d2e9dd05c13e2e2f90ae1d08fb96f97a8e993e9..c9449eace0909e4dd075b298cc12d5201d9b0a6d 100755 (executable)
@@ -6,6 +6,10 @@ export DH_VERBOSE=1
 %:
        dh $@ --buildsystem python_distutils --with python2
 
+override_dh_installlogrotate:
+       cp logrotate.conf debian/radosgw-agent.logrotate
+       dh_installlogrotate
+
 override_dh_installinit:
        install -d -m0755 debian/radosgw-agent/etc/init
        install -m0644 init-radosgw-agent debian/radosgw-agent/etc/init
diff --git a/logrotate.conf b/logrotate.conf
new file mode 100644 (file)
index 0000000..7be94e4
--- /dev/null
@@ -0,0 +1,6 @@
+/var/log/ceph/radosgw-agent/*.log {
+    rotate 7
+    daily
+    compress
+    missingok
+}
index 3113611e0ceccb97b91082dea498f9ae25ef4d77..8485525fad4fb60e8ebb1b18db7338342b0847bd 100644 (file)
@@ -34,6 +34,7 @@ install -D init-radosgw-agent $RPM_BUILD_ROOT%{_initrddir}/radosgw-agent
 
 %install
 python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+install -m 0644 -D logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/radosgw-agent
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -43,3 +44,4 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_sysconfdir}/ceph/radosgw-agent/
 %dir %{_localstatedir}/log/ceph/radosgw-agent/
 %dir %{_localstatedir}/run/ceph/radosgw-agent/
+%config(noreplace) %{_sysconfdir}/logrotate.d/radosgw-agent