[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "tools: store verbose logrotate logs"

2017-02-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329217 )

Change subject: Revert "tools: store verbose logrotate logs"
..


Revert "tools: store verbose logrotate logs"

The changes to the cron file apparently did not produce debugging
output, and the underlying issue has mostly gone away, if not
completely.  Restoring /etc/cron.daily/logrotate will be done by
manually running:

| sudo rm -f /etc/cron.daily/logrotate &&
| sudo apt-get --reinstall -o Dpkg::Options::=--force-confask -o 
Dpkg::Options::=--force-confnew install logrotate

on all Tools instances with clush after this change has been merged.

Bug: T96007
Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
---
D modules/toollabs/files/logrotate.crondaily
M modules/toollabs/manifests/init.pp
2 files changed, 0 insertions(+), 25 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/toollabs/files/logrotate.crondaily 
b/modules/toollabs/files/logrotate.crondaily
deleted file mode 100644
index 964b2b2..000
--- a/modules/toollabs/files/logrotate.crondaily
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# This file is managed by Puppet.
-# Based on logrotate-bundled cron file, Version: 3.8.7-1ubuntu1
-# Clean non existent log file entries from status file
-cd /var/lib/logrotate
-test -e status || touch status
-head -1 status > status.clean
-sed 's/"//g' status | while read logfile date
-do
-[ -e "$logfile" ] && echo "\"$logfile\" $date"
-done >> status.clean
-mv status.clean status
-
-test -x /usr/sbin/logrotate || exit 0
-# > instead of >> to clear logrotate.log daily
-# copy output to stderr on non-zero exit code to trigger a cron email
-/usr/sbin/logrotate -v /etc/logrotate.conf > /var/log/logrotate.log 2>&1 || 
cat /var/log/logrotate.log >&2
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 49cdebd..3ef6e56 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -181,14 +181,6 @@
 source => 'puppet:///modules/toollabs/40-tools-sudoers-no-warning.sh',
 }
 
-file { '/etc/cron.daily/logrotate':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/logrotate.crondaily',
-}
-
 file { '/usr/local/bin/log-command-invocation':
 ensure => present,
 owner  => 'root',

-- 
To view, visit https://gerrit.wikimedia.org/r/329217
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "tools: store verbose logrotate logs"

2016-12-26 Thread Tim Landscheidt (Code Review)
Hello Yuvipanda, Merlijn van Deen, jenkins-bot, Coren,

I'd like you to do a code review.  Please visit

https://gerrit.wikimedia.org/r/329217

to review the following change.


Change subject: Revert "tools: store verbose logrotate logs"
..

Revert "tools: store verbose logrotate logs"

The changes to the cron file apparently did not produce debugging
output, and the underlying issue has mostly gone away, if not
completely.  Restoring /etc/cron.daily/logrotate will be done by
manually running:

| sudo rm -f /etc/cron.daily/logrotate &&
| sudo apt-get --reinstall -o Dpkg::Options::=--force-confmiss install logrotate

on all Tools instances with clush after this change has been merged.

Bug: T96007
Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
---
D modules/toollabs/files/logrotate.crondaily
M modules/toollabs/manifests/init.pp
2 files changed, 0 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/329217/1

diff --git a/modules/toollabs/files/logrotate.crondaily 
b/modules/toollabs/files/logrotate.crondaily
deleted file mode 100644
index 964b2b2..000
--- a/modules/toollabs/files/logrotate.crondaily
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# This file is managed by Puppet.
-# Based on logrotate-bundled cron file, Version: 3.8.7-1ubuntu1
-# Clean non existent log file entries from status file
-cd /var/lib/logrotate
-test -e status || touch status
-head -1 status > status.clean
-sed 's/"//g' status | while read logfile date
-do
-[ -e "$logfile" ] && echo "\"$logfile\" $date"
-done >> status.clean
-mv status.clean status
-
-test -x /usr/sbin/logrotate || exit 0
-# > instead of >> to clear logrotate.log daily
-# copy output to stderr on non-zero exit code to trigger a cron email
-/usr/sbin/logrotate -v /etc/logrotate.conf > /var/log/logrotate.log 2>&1 || 
cat /var/log/logrotate.log >&2
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 27ec24a..19979fe 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -207,14 +207,5 @@
 source => 'puppet:///modules/toollabs/40-tools-sudoers-no-warning',
 }
 
-file { '/etc/cron.daily/logrotate':
-ensure  => file,
-mode=> '0664',
-owner   => 'root',
-group   => 'root',
-source  => 'puppet:///modules/toollabs/logrotate.crondaily',
-require => Package['logrotate']
-}
-
 diamond::collector::localcrontab { 'localcrontabcollector': }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/329217
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits