Elukey has uploaded a new change for review. https://gerrit.wikimedia.org/r/303136
Change subject: Add a logrotate policy to the hdfs-balancer script ...................................................................... Add a logrotate policy to the hdfs-balancer script This script runs daily on analytics1027 and appends its output to a logfile. Change-Id: Ibc96cf8858d3379cc3f0dd00c8e0982cfb20b8af --- A modules/role/files/analytics_cluster/hadoop/hadoop_hdfs.logrotate M modules/role/manifests/analytics_cluster/hadoop/balancer.pp 2 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/303136/1 diff --git a/modules/role/files/analytics_cluster/hadoop/hadoop_hdfs.logrotate b/modules/role/files/analytics_cluster/hadoop/hadoop_hdfs.logrotate new file mode 100644 index 0000000..944b5d1 --- /dev/null +++ b/modules/role/files/analytics_cluster/hadoop/hadoop_hdfs.logrotate @@ -0,0 +1,11 @@ +# Note: This file is managed by Puppet. +# +/var/log/hadoop-hdfs/*.log { + weekly + rotate 4 + missingok + notifempty + nocreate + compress + delaycompress +} \ No newline at end of file diff --git a/modules/role/manifests/analytics_cluster/hadoop/balancer.pp b/modules/role/manifests/analytics_cluster/hadoop/balancer.pp index 05d0d4c..b0d9b9a 100644 --- a/modules/role/manifests/analytics_cluster/hadoop/balancer.pp +++ b/modules/role/manifests/analytics_cluster/hadoop/balancer.pp @@ -10,6 +10,14 @@ group => 'hdfs', } + # logrotate HDFS balancer's log files + file { '/etc/logrotate.d/hdfs_balancer': + source => 'puppet:///modules/role/analytics_cluster/hadoop/hdfs_balancer.logrotate', + owner => 'root', + group => 'root', + mode => '0444', + } + cron { 'hdfs-balancer': command => '/usr/local/bin/hdfs-balancer >> /var/log/hadoop-hdfs/balancer.log 2>&1', user => 'hdfs', -- To view, visit https://gerrit.wikimedia.org/r/303136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc96cf8858d3379cc3f0dd00c8e0982cfb20b8af Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Elukey <ltosc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits