From 54bd11793c13140651d908db7f88d550712ee85a Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 28 Jan 2016 11:12:59 +0100 Subject: [bug] Fix removing of bigcouch logwatch spoolfiles The problem was that puppet tried to remove them on the couch node, but they need to get removed on monitor node. - Resolves: #7641 --- puppet/modules/site_config/manifests/remove/bigcouch.pp | 6 +----- puppet/modules/site_config/manifests/remove/monitoring.pp | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'puppet') diff --git a/puppet/modules/site_config/manifests/remove/bigcouch.pp b/puppet/modules/site_config/manifests/remove/bigcouch.pp index 0783fe9d..f8e0ebe2 100644 --- a/puppet/modules/site_config/manifests/remove/bigcouch.pp +++ b/puppet/modules/site_config/manifests/remove/bigcouch.pp @@ -10,11 +10,7 @@ class site_config::remove::bigcouch { Exec['remove_bigcouch_logwatch_stateline'] ] } - # remove leftover bigcouch logwatch spool files - exec { 'remove_bigcouch_logwatch_spoolfiles': - command => 'find /var/lib/check_mk/logwatch -name \'\\opt\\bigcouch\\var\\log\\bigcouch.log\' -exec rm {} \;', - refreshonly => true, - } + exec { 'remove_bigcouch_logwatch_stateline': command => "sed -i '/bigcouch.log/d' /etc/check_mk/logwatch.state", refreshonly => true, diff --git a/puppet/modules/site_config/manifests/remove/monitoring.pp b/puppet/modules/site_config/manifests/remove/monitoring.pp index d7095597..ab9f7a8f 100644 --- a/puppet/modules/site_config/manifests/remove/monitoring.pp +++ b/puppet/modules/site_config/manifests/remove/monitoring.pp @@ -7,4 +7,11 @@ class site_config::remove::monitoring { recurse => true, matches => '*tapicero.log' } + + # remove leftover bigcouch logwatch spool files + exec { 'remove_bigcouch_logwatch_spoolfiles': + command => 'find /var/lib/check_mk/logwatch -name \'\\opt\\bigcouch\\var\\log\\bigcouch.log\' -exec rm {} \;', + refreshonly => true, + } + } -- cgit v1.2.3