Andrew Bogott has submitted this change and it was merged.
Change subject: Change the keystone token cleanup cron.
......................................................................
Change the keystone token cleanup cron.
Now run hourly with a limit -- the previous query was so gigantic
that it essentiall never finished; instead we have to whittle
the table down gradually.
Change-Id: I004f6bad81905c4026a6e778c5764f9e11ead04f
---
M modules/openstack/manifests/database-server.pp
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/openstack/manifests/database-server.pp
b/modules/openstack/manifests/database-server.pp
index b81d8fd..152cfb2 100644
--- a/modules/openstack/manifests/database-server.pp
+++ b/modules/openstack/manifests/database-server.pp
@@ -140,12 +140,11 @@
# Clean up expired keystone tokens, because keystone seems to leak them
cron {
- 'run-jobs':
+ 'cleanup_expired_keystone_tokens':
user => 'root',
- hour => 8,
- minute => 0,
+ minute => 20,
ensure => present,
- command => "/usr/bin/mysql $keystone_db_name -u${keystone_db_user}
-p${keystone_db_pass} -e 'DELETE FROM token WHERE NOT
DATE_SUB(CURDATE(),INTERVAL 2 DAY) <= expires;'",
+ command => "/usr/bin/mysql $keystone_db_name -u${keystone_db_user}
-p${keystone_db_pass} -e 'DELETE FROM token WHERE NOW() - INTERVAL 2 day >
expires LIMIT 10000;'",
}
}
--
To view, visit https://gerrit.wikimedia.org/r/204519
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I004f6bad81905c4026a6e778c5764f9e11ead04f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits