summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-08 13:51:32 +0100
committervarac <varacanero@zeromail.org>2016-03-10 20:27:34 +0100
commitaa2c2590e7b976805402c4c0a2ebe4b554304a85 (patch)
tree70fce30ba7e3a9e36584973906b4d3995d81e831
parent997208ba341c79acf90228a16b59ab2346899a2d (diff)
[bug] Remove stunnel leftovers from bigcouch
- Resolves: #7785
-rw-r--r--puppet/modules/site_config/manifests/remove/bigcouch.pp21
1 files changed, 21 insertions, 0 deletions
diff --git a/puppet/modules/site_config/manifests/remove/bigcouch.pp b/puppet/modules/site_config/manifests/remove/bigcouch.pp
index 26ba8d09..3535c3c1 100644
--- a/puppet/modules/site_config/manifests/remove/bigcouch.pp
+++ b/puppet/modules/site_config/manifests/remove/bigcouch.pp
@@ -18,4 +18,25 @@ class site_config::remove::bigcouch {
cron { 'compact_all_shards':
ensure => absent
}
+
+
+ exec { 'kill_bigcouch_stunnel_procs':
+ refreshonly => true,
+ command => '/usr/bin/pkill -f "/usr/bin/stunnel4 /etc/stunnel/(ednp|epmd)_server.conf"'
+ }
+
+ # 'tidy' doesn't notify other resources, so we need to use file here instead
+ # see https://tickets.puppetlabs.com/browse/PUP-6021
+ file {
+ [ '/etc/stunnel/ednp_server.conf', '/etc/stunnel/epmd_server.conf']:
+ ensure => absent,
+ # notifying Service[stunnel] doesn't work here because the config
+ # files contain the pid of the procs to stop/start.
+ # If we remove the config, and restart stunnel then it will only
+ # stop/start the procs for which config files are found and the stale
+ # service will continue to run.
+ # So we simply kill them.
+ notify => Exec['kill_bigcouch_stunnel_procs']
+ }
+
}