summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-01-25 17:27:48 +0100
committervarac <varacanero@zeromail.org>2016-01-27 11:57:13 +0100
commit01b05ec8453b44d93780e04dd832b9a0e7b3cd48 (patch)
tree999be2c8b68d38e11d8816cf3b023049b3918409 /puppet/modules/site_couchdb
parentb95d60260ecb57fe08fca0571771a14b803c1b4e (diff)
[feat] Cronjob to delete orphaned userdbs
- Resolves: #7418
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp9
1 files changed, 9 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index ea02d1f4..8d79ae75 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -66,4 +66,13 @@ class site_couchdb {
# remove tapicero leftovers on couchdb nodes
include site_config::remove::tapicero
+ # Destroy every per-user storage database
+ # where the corresponding user record does not exist.
+ cron { 'cleanup_stale_userdbs':
+ command => '(/bin/date; /srv/leap/couchdb/scripts/cleanup-user-dbs) >> /var/log/leap/couchdb-cleanup.log',
+ user => 'root',
+ hour => 4,
+ minute => 7;
+ }
+
}