Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1148098

Summary: [Staypuft][Keystone] No Keystone Crontab to flush tokens
Product: Red Hat OpenStack Reporter: Joe Talerico <jtaleric>
Component: openstack-foreman-installerAssignee: Jason Guiditta <jguiditt>
Status: CLOSED DUPLICATE QA Contact: Ami Jeain <ajeain>
Severity: high Docs Contact:
Priority: high    
Version: 5.0 (RHEL 7)CC: mburns, morazi, nkinder, rhos-maint, yeylon
Target Milestone: z2Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-30 18:57:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Talerico 2014-09-30 17:13:53 UTC
Description of problem:
Staypuft does not put the keystone crontabs in place to flush tables. 

Similar to packstack: 
https://github.com/stackforge/packstack/blob/master/packstack/puppet/templates/keystone.pp#L24

Comment 2 Nathan Kinder 2014-09-30 17:23:36 UTC
I don't see the token flush cronjob setup being performed in astapor:

  https://github.com/redhat-openstack/astapor/blob/master/puppet/modules/quickstack/manifests/controller_common.pp

  https://github.com/redhat-openstack/astapor/blob/master/puppet/modules/quickstack/manifests/keystone/common.pp

We should be doing something similar to packstack:

------------------------------------------------------------------------
# Run token flush every minute (without output so we won't spam admins)
cron { 'token-flush':
    ensure => 'present',
    command => '/usr/bin/keystone-manage token_flush >/dev/null 2>&1',
    minute => '*/1',
    user => 'keystone',
    require => [User['keystone'], Group['keystone']],
} -> service { 'crond':
    ensure => 'running',
    enable => true,
}
------------------------------------------------------------------------

This cron job needs to be set up for both HA and non-HA.  Without this, the token database will grow without bounds, as expired tokens will never be removed.

Comment 3 Jason Guiditta 2014-09-30 18:57:05 UTC
Can do this if required, please see comments in original BZ (never got a reply to my question):

https://bugzilla.redhat.com/show_bug.cgi?id=1127236#c3

*** This bug has been marked as a duplicate of bug 1127236 ***