Commit f660b034 by Thomas Gambier

stack/logrotate: Use xz for log compression.

Use xz instead of gzip.
Also put the cron script in etc/service instead of etc/run (to have the
"cron-on-watch" process)
1 parent c465ef49
......@@ -72,7 +72,7 @@ class ServicesTestCase(InstanceTestCase):
]
expected_process_names = [
'monitor-httpd-{hash}-on-watch',
'crond-{hash}',
'crond-{hash}-on-watch',
]
supervisor = self.getSupervisorRPCServer().supervisor
......
......@@ -2,7 +2,7 @@
extends =
buildout.hash.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/xz-utils/buildout.cfg
../../component/logrotate/buildout.cfg
parts =
template-logrotate-base
......@@ -25,7 +25,7 @@ template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-logrotate-base.cfg
context =
key dcron_location dcron:location
key gzip_location gzip:location
key xz_location xz-utils:location
key logrotate_location logrotate:location
key logrotate_conf_template logrotate-conf-template:target
key logrotate_entry_template logrotate-entry-template:target
......@@ -14,7 +14,7 @@
# not need these here).
[logrotate-conf-template]
filename = logrotate.conf.in
md5sum = 67954c82a8030e5dcac3a8c5d115f624
md5sum = 2fc0ea335969ffab7d8c4f98e3d04ae7
[logrotate-entry-template]
filename = logrotate_entry.in
......@@ -22,4 +22,4 @@ md5sum = 117e46af6d9d31c09eeb86089d11407e
[template-logrotate-base]
filename = instance-logrotate-base.cfg.in
md5sum = f56b86a0742afff931a5e972114566e4
md5sum = e2aec5faa92f1c9f4b436eae1a3e6881
......@@ -28,8 +28,8 @@ wrapper = ${logrotate-directory:bin}/cron_simplelogger
log = ${logrotate-directory:log}/cron.log
[logrotate-conf-parameter]
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
compress-binary = {{ xz_location }}/bin/xz
uncompress-binary = {{ xz_location }}/bin/unxz
logrotate-entries = ${logrotate-directory:logrotate-entries}
[logrotate-conf]
......@@ -91,5 +91,5 @@ bin = ${buildout:directory}/bin
srv = ${buildout:directory}/srv
backup = ${:srv}/backup
etc = ${buildout:directory}/etc
services = ${:etc}/run
services = ${:etc}/service
log = ${buildout:directory}/var/log
compresscmd {{ parameter_dict['gzip-binary'] }}
compresscmd {{ parameter_dict['compress-binary'] }}
compressoptions -9
uncompresscmd {{ parameter_dict['gunzip-binary'] }}
uncompresscmd {{ parameter_dict['uncompress-binary'] }}
include {{ parameter_dict['logrotate-entries'] }}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!